http://codereview.chromium.org/141044/diff/1002/4 File include/v8.h (right):
http://codereview.chromium.org/141044/diff/1002/4#newcode1179 Line 1179: bool CloneElementAt(uint32_t index, Handle<Object>* result); Please add a comment that explains this method including the fact that it can fail. I would remove the bool return value and just have the signature: Handle<Object> CloneElementAt(uint32_t index); Returning an empty handle will then signal that the cloning failed. http://codereview.chromium.org/141044/diff/1002/5 File src/api.cc (right): http://codereview.chromium.org/141044/diff/1002/5#newcode3026 Line 3026: i::Object* cloned = i::Heap::CopyJSObject(i::JSObject::cast(paragon)); Why not use the handle based version i::Copy instead and let that handle allocation failures? You can model this after the Object::Clone method. http://codereview.chromium.org/141044 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
