| Index: src/apinatives.js
|
| ===================================================================
|
| --- src/apinatives.js (revision 8778)
|
| +++ src/apinatives.js (working copy)
|
| @@ -73,14 +73,10 @@
|
| if (name) %FunctionSetName(fun, name);
|
| cache[serialNumber] = fun;
|
| var prototype = %GetTemplateField(data, kApiPrototypeTemplateOffset);
|
| - var attributes = %GetTemplateField(data, kApiPrototypeAttributesOffset);
|
| - if (attributes != NONE) {
|
| - %IgnoreAttributesAndSetProperty(
|
| - fun, "prototype",
|
| - prototype ? Instantiate(prototype) : {},
|
| - attributes);
|
| - } else {
|
| - fun.prototype = prototype ? Instantiate(prototype) : {};
|
| + var flags = %GetTemplateField(data, kApiFlagOffset);
|
| + fun.prototype = prototype ? Instantiate(prototype) : {};
|
| + if (flags & (1 << kReadOnlyPrototypeBit)) {
|
| + %FunctionSetReadOnlyPrototype(fun);
|
| }
|
| %SetProperty(fun.prototype, "constructor", fun, DONT_ENUM);
|
| var parent = %GetTemplateField(data, kApiParentTemplateOffset);
|
|
|