Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Unified Diff: src/runtime/runtime-scopes.cc

Issue 2582493002: [runtime] Throw if attempting to re-declaring an accessor. (Closed)
Patch Set: Add test. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-api-accessors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index f634cc119d80bc1f3bf739985d310a72225d67b9..3161b83455ffafb2ee9f817f2c2126146dcae305 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -88,8 +88,7 @@ Object* DeclareGlobal(
// function.
PropertyDetails old_details = it.property_details();
if (old_details.IsReadOnly() || old_details.IsDontEnum() ||
- (it.state() == LookupIterator::ACCESSOR &&
- it.GetAccessors()->IsAccessorPair())) {
+ (it.state() == LookupIterator::ACCESSOR)) {
// ECMA-262 section 15.1.11 GlobalDeclarationInstantiation 5.d:
// If hasRestrictedGlobal is true, throw a SyntaxError exception.
// ECMA-262 section 18.2.1.3 EvalDeclarationInstantiation 8.a.iv.1.b:
« no previous file with comments | « no previous file | test/cctest/test-api-accessors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698