Made function prototype property DontEnum for compatibility with

Safari.  Fixed const error in api.

Review URL: http://codereview.chromium.org/200056


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2bc682e3
......@@ -1024,8 +1024,8 @@ class V8EXPORT String : public Primitive {
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_;
......
......@@ -474,7 +474,7 @@ void Genesis::CreateRoots(v8::Handle<v8::ObjectTemplate> global_template,
// 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
......
......@@ -90,8 +90,9 @@ assertEquals(F.prototype, GetPrototypeOf(F));
// 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, "");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment