| Index: src/v8natives.js
|
| diff --git a/src/v8natives.js b/src/v8natives.js
|
| index b715e8923ff26184b43d2f5f432e9e5a3cf778d3..96b88c5285c9962d479fa75d0e71031cd0c35b6c 100644
|
| --- a/src/v8natives.js
|
| +++ b/src/v8natives.js
|
| @@ -170,19 +170,18 @@ function GlobalParseFloat(string) {
|
| function GlobalEval(x) {
|
| if (!IS_STRING(x)) return x;
|
|
|
| - var global_receiver = %GlobalReceiver(global);
|
| - var global_is_detached = (global === global_receiver);
|
| -
|
| // For consistency with JSC we require the global object passed to
|
| // eval to be the global object from which 'eval' originated. This
|
| // is not mandated by the spec.
|
| // We only throw if the global has been detached, since we need the
|
| // receiver as this-value for the call.
|
| - if (global_is_detached) {
|
| + if (!%IsAttachedGlobal(global)) {
|
| throw new $EvalError('The "this" value passed to eval must ' +
|
| 'be the global object from which eval originated');
|
| }
|
|
|
| + var global_receiver = %GlobalReceiver(global);
|
| +
|
| var f = %CompileString(x, false);
|
| if (!IS_FUNCTION(f)) return f;
|
|
|
|
|