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

Side by Side Diff: src/accessors.cc

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: . Created 5 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/globals.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/contexts.h" 10 #include "src/contexts.h"
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 } 1399 }
1400 // If caller is bound, return null. This is compatible with JSC, and 1400 // If caller is bound, return null. This is compatible with JSC, and
1401 // allows us to make bound functions use the strict function map 1401 // allows us to make bound functions use the strict function map
1402 // and its associated throwing caller and arguments. 1402 // and its associated throwing caller and arguments.
1403 if (caller->shared()->bound()) { 1403 if (caller->shared()->bound()) {
1404 return MaybeHandle<JSFunction>(); 1404 return MaybeHandle<JSFunction>();
1405 } 1405 }
1406 // Censor if the caller is not a sloppy mode function. 1406 // Censor if the caller is not a sloppy mode function.
1407 // Change from ES5, which used to throw, see: 1407 // Change from ES5, which used to throw, see:
1408 // https://bugs.ecmascript.org/show_bug.cgi?id=310 1408 // https://bugs.ecmascript.org/show_bug.cgi?id=310
1409 if (caller->shared()->strict_mode() == STRICT) { 1409 if (is_strict(caller->shared()->language_mode())) {
1410 return MaybeHandle<JSFunction>(); 1410 return MaybeHandle<JSFunction>();
1411 } 1411 }
1412 // Don't return caller from another security context. 1412 // Don't return caller from another security context.
1413 if (!AllowAccessToFunction(isolate->context(), caller)) { 1413 if (!AllowAccessToFunction(isolate->context(), caller)) {
1414 return MaybeHandle<JSFunction>(); 1414 return MaybeHandle<JSFunction>();
1415 } 1415 }
1416 return Handle<JSFunction>(caller); 1416 return Handle<JSFunction>(caller);
1417 } 1417 }
1418 1418
1419 1419
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 info->set_data(Smi::FromInt(index)); 1528 info->set_data(Smi::FromInt(index));
1529 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1529 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1530 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1530 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1531 info->set_getter(*getter); 1531 info->set_getter(*getter);
1532 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1532 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1533 return info; 1533 return info;
1534 } 1534 }
1535 1535
1536 1536
1537 } } // namespace v8::internal 1537 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698