I think this is the right approach. However, it'd be good to have some API-side
test cases that check things like switching the global receiver. This is
important, I believe, because it might actually be a security leak if it goes
wrong.


https://codereview.chromium.org/11414094/diff/1/src/runtime.cc
File src/runtime.cc (right):

https://codereview.chromium.org/11414094/diff/1/src/runtime.cc#newcode13163
src/runtime.cc:13163: if (obj->IsNull()) return
isolate->heap()->undefined_value();
Perhaps you should return false here.

https://codereview.chromium.org/11414094/diff/1/src/runtime.cc#newcode13175
src/runtime.cc:13175: JSGlobalProxy* global_proxy = NULL;
What do you need this for?

https://codereview.chromium.org/11414094/diff/1/src/runtime.cc#newcode13234
src/runtime.cc:13234: if (key->IsNull()) return
isolate->heap()->undefined_value();
Return this.

https://codereview.chromium.org/11414094/diff/1/src/runtime.cc#newcode13248
src/runtime.cc:13248: if (key->IsNull()) return
isolate->heap()->undefined_value();
False here, too.

https://codereview.chromium.org/11414094/diff/1/test/mjsunit/harmony/object-observe.js
File test/mjsunit/harmony/object-observe.js (right):

https://codereview.chromium.org/11414094/diff/1/test/mjsunit/harmony/object-observe.js#newcode61
test/mjsunit/harmony/object-observe.js:61: } catch (e) { }
Can you factor this out into a helper function that you use here and
below?

https://codereview.chromium.org/11414094/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to