Skip to content

Instantly share code, notes, and snippets.

@WebReflection
Created May 22, 2014 19:57
Show Gist options
  • Select an option

  • Save WebReflection/15623f20cf19635f4db7 to your computer and use it in GitHub Desktop.

Select an option

Save WebReflection/15623f20cf19635f4db7 to your computer and use it in GitHub Desktop.
ctor->defineDefaultProperty(QStringLiteral("setPrototypeOf"), method_set_proto_of, 2);
ReturnedValue ObjectPrototype::method_set_proto_of(CallContext *ctx)
{
Scope scope(ctx);
Scoped<Object> o(scope, ctx->argument(0));
Scoped<Object> p(scope, ctx->argument(1));
if (!o)
return ctx->throwTypeError();
o->method_set_proto(p);
return o.asReturnedValue();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment