Revision: 2852 Author: [email protected] Date: Wed Sep 9 02:30:33 2009 Log: Made function prototype property DontEnum for compatibility with Safari. Fixed const error in api.
Review URL: http://codereview.chromium.org/200056 http://code.google.com/p/v8/source/detail?r=2852 Modified: /branches/bleeding_edge/include/v8.h /branches/bleeding_edge/src/bootstrapper.cc /branches/bleeding_edge/test/mjsunit/function-prototype.js ======================================= --- /branches/bleeding_edge/include/v8.h Mon Sep 7 00:54:51 2009 +++ /branches/bleeding_edge/include/v8.h Wed Sep 9 02:30:33 2009 @@ -1024,8 +1024,8 @@ public: explicit Value(Handle<v8::Value> obj); ~Value(); - uint16_t* operator*() const { return str_; } - const uint16_t* operator*() { return str_; } + uint16_t* operator*() { return str_; } + const uint16_t* operator*() const { return str_; } int length() const { return length_; } private: uint16_t* str_; ======================================= --- /branches/bleeding_edge/src/bootstrapper.cc Thu Jul 23 05:51:49 2009 +++ /branches/bleeding_edge/src/bootstrapper.cc Wed Sep 9 02:30:33 2009 @@ -474,7 +474,7 @@ // Please note that the prototype property for function instances must be // writable. Handle<DescriptorArray> function_map_descriptors = - ComputeFunctionInstanceDescriptor(false, true); + ComputeFunctionInstanceDescriptor(false, false); fm->set_instance_descriptors(*function_map_descriptors); // Allocate the function map first and then patch the prototype later ======================================= --- /branches/bleeding_edge/test/mjsunit/function-prototype.js Tue Sep 9 13:08:45 2008 +++ /branches/bleeding_edge/test/mjsunit/function-prototype.js Wed Sep 9 02:30:33 2009 @@ -90,8 +90,9 @@ // in GetPrototypeOf and go to a monomorphic IC load instead. assertEquals(87, GetPrototypeOf({prototype:87})); -// Check the prototype is enumerable as specified in ECMA262, 15.3.5.2 +// Check the prototype is not enumerable, for compatibility with +// safari. This is deliberately incompatible with ECMA262, 15.3.5.2. var foo = new Function("return x"); var result = "" for (var n in foo) result += n; -assertEquals(result, "prototype"); +assertEquals(result, ""); --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
