https://codereview.chromium.org/475423003/diff/60001/src/heap/heap.cc
File src/heap/heap.cc (right):

https://codereview.chromium.org/475423003/diff/60001/src/heap/heap.cc#newcode3758
src/heap/heap.cc:3758: if (source->IsJSFunction()) {
Are you sure this works? What code object does this get? What if it's
optimized? If we also become optimized, will we get notified in case the
function deoptimizes?

Can you just make a specialized JSFunction::Copy(), that preferably uses
NewFunctionFromSharedFunctionInfo, but additionally copies over
properties and prototype?

https://codereview.chromium.org/475423003/diff/60001/src/runtime.cc
File src/runtime.cc (right):

https://codereview.chromium.org/475423003/diff/60001/src/runtime.cc#newcode2063
src/runtime.cc:2063: Object::SetProperty(clone, home_object_symbol,
home_object, STRICT));
Perhaps use JSObject::SetOwnPropertyIgnoreAttributes?

https://codereview.chromium.org/475423003/diff/60001/test/mjsunit/harmony/toMethod.js
File test/mjsunit/harmony/toMethod.js (right):

https://codereview.chromium.org/475423003/diff/60001/test/mjsunit/harmony/toMethod.js#newcode97
test/mjsunit/harmony/toMethod.js:97: function f(x, y, z) {
Add flag "called = false" on the outside, and set it to true on the
inside, to ensure the method is even called.

https://codereview.chromium.org/475423003/diff/60001/test/mjsunit/harmony/toMethod.js#newcode108
test/mjsunit/harmony/toMethod.js:108: }());
What about tests for rebinding a method, given that those are just
JSFunctions too? (This is API is a bit weird imho...)

https://codereview.chromium.org/475423003/

--
--
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/d/optout.

Reply via email to