Status: Accepted
Owner: [email protected]
Labels: Type-Bug Priority-Medium

New issue 2854 by [email protected]: Holder == This on function callbacks always (i think)
http://code.google.com/p/v8/issues/detail?id=2854

in the following, i expect bar4 and bar5 to trigger the ASSERTION in handle_property:


static void handle_property(const v8::FunctionCallbackInfo<v8::Value>& info) { ASSERT(*reinterpret_cast<i::Object**>(*info.This()) == *reinterpret_cast<i::Object**>(*info.Holder()));
}


  Local<v8::FunctionTemplate> parent_templ = v8::FunctionTemplate::New();
  Local<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New();
  fun_templ->Inherit(parent_templ);

  Local<v8::FunctionTemplate> getter_templ =
v8::FunctionTemplate::New(handle_property, Local<Value>(), v8::Signature::New(parent_templ));

  fun_templ->InstanceTemplate()->Set(v8_str("bar4"), getter_templ);
  fun_templ->PrototypeTemplate()->Set(v8_str("bar5"), getter_templ);
  parent_templ->PrototypeTemplate()->Set(v8_str("bar6"), getter_templ);

  env->Global()->Set(v8_str("Fun"), fun_templ->GetFunction());

  CompileRun(
      "var obj = new Fun();"
      "for (var i = 0; i < 20; i++) {"
      "   obj.bar4();"
      "}"
      "for (var i = 0; i < 20; i++) {"
      "   obj.bar5();"
      "}"
      "for (var i = 0; i < 20; i++) {"
      "   obj.bar6();"
      "}"
  );

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to