diff options
author | Torne (Richard Coles) <torne@google.com> | 2014-12-18 14:16:24 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2014-12-18 14:16:24 +0000 |
commit | 9509a93a54f7e56e92c287cc36d2b626c0679104 (patch) | |
tree | 6bd2775d64f993daa95c3564066ebba54ad2108f | |
parent | b07490fed7e3a1f0444b29e77eea1fe5d1c35b95 (diff) | |
parent | 73d185410c13e51a62e4dc41752099e27d36646a (diff) | |
download | v8-9509a93a54f7e56e92c287cc36d2b626c0679104.tar.gz |
Merge v8 from https://chromium.googlesource.com/v8/v8.git at 73d185410c13e51a62e4dc41752099e27d36646a
This commit was generated by merge_from_chromium.py.
Change-Id: I7e991aa4e28f7b5afe1b1538b37b524ed99e7585
-rw-r--r-- | src/runtime/runtime-scopes.cc | 6 | ||||
-rw-r--r-- | src/version.cc | 2 | ||||
-rw-r--r-- | test/mjsunit/regress/regress-410030.js | 43 |
3 files changed, 48 insertions, 3 deletions
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc index c935cdabe..cd13b39e9 100644 --- a/src/runtime/runtime-scopes.cc +++ b/src/runtime/runtime-scopes.cc @@ -298,9 +298,11 @@ RUNTIME_FUNCTION(Runtime_InitializeLegacyConstLookupSlot) { // The declared const was configurable, and may have been deleted in the // meanwhile. If so, re-introduce the variable in the context extension. - DCHECK(context_arg->has_extension()); if (attributes == ABSENT) { - holder = handle(context_arg->extension(), isolate); + Handle<Context> declaration_context(context_arg->declaration_context()); + DCHECK(declaration_context->has_extension()); + holder = handle(declaration_context->extension(), isolate); + CHECK(holder->IsJSObject()); } else { // For JSContextExtensionObjects, the initializer can be run multiple times // if in a for loop: for (var i = 0; i < 2; i++) { const x = i; }. Only the diff --git a/src/version.cc b/src/version.cc index 0e3a188f5..60eb70312 100644 --- a/src/version.cc +++ b/src/version.cc @@ -35,7 +35,7 @@ #define MAJOR_VERSION 3 #define MINOR_VERSION 30 #define BUILD_NUMBER 33 -#define PATCH_LEVEL 8 +#define PATCH_LEVEL 9 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) #define IS_CANDIDATE_VERSION 0 diff --git a/test/mjsunit/regress/regress-410030.js b/test/mjsunit/regress/regress-410030.js new file mode 100644 index 000000000..efd4b1e75 --- /dev/null +++ b/test/mjsunit/regress/regress-410030.js @@ -0,0 +1,43 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +try { + throw 0; +} catch(e) { + assertSame(3, eval("delete x; const x=3; x")); +} + + +try { + throw 0; +} catch(e) { + assertSame(3, (1,eval)("delete x1; const x1=3; x1")); +} + + +try { + throw 0; +} catch(e) { + with({}) { + assertSame(3, eval("delete x2; const x2=3; x2")); + } +} + + +(function f() { + try { + throw 0; + } catch(e) { + assertSame(3, eval("delete x; const x=3; x")); + } +}()); + + +(function f() { + try { + throw 0; + } catch(e) { + assertSame(3, (1,eval)("delete x4; const x4=3; x4")); + } +}()); |