| Index: src/v8natives.js
|
| diff --git a/src/v8natives.js b/src/v8natives.js
|
| index e2e642941e9e95fc882b2b024d2ff69812bdd631..32e673c5f38e58573c44f820602b8050831eaad3 100644
|
| --- a/src/v8natives.js
|
| +++ b/src/v8natives.js
|
| @@ -60,6 +60,16 @@ function InstallFunctions(object, attributes, functions) {
|
| %ToFastProperties(object);
|
| }
|
|
|
| +
|
| +// Helper function to install a getter only property.
|
| +function InstallGetter(object, name, getter) {
|
| + %FunctionSetName(getter, name);
|
| + %FunctionRemovePrototype(getter);
|
| + %DefineOrRedefineAccessorProperty(object, name, getter, null, DONT_ENUM);
|
| + %SetNativeFlag(getter);
|
| +}
|
| +
|
| +
|
| // Prevents changes to the prototype of a built-infunction.
|
| // The "prototype" property of the function object is made non-configurable,
|
| // and the prototype object is made non-extensible. The latter prevents
|
|
|