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

Side by Side Diff: src/runtime/runtime-internal.cc

Issue 2628863002: Do security checks in the promise constructor (Closed)
Patch Set: updates Created 3 years, 11 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 | « src/runtime/runtime.h ('k') | test/mjsunit/cross-realm-filtering.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
11 #include "src/bootstrapper.h" 11 #include "src/bootstrapper.h"
12 #include "src/builtins/builtins.h"
12 #include "src/conversions.h" 13 #include "src/conversions.h"
13 #include "src/debug/debug.h" 14 #include "src/debug/debug.h"
14 #include "src/frames-inl.h" 15 #include "src/frames-inl.h"
15 #include "src/isolate-inl.h" 16 #include "src/isolate-inl.h"
16 #include "src/messages.h" 17 #include "src/messages.h"
17 #include "src/parsing/parse-info.h" 18 #include "src/parsing/parse-info.h"
18 #include "src/parsing/parsing.h" 19 #include "src/parsing/parsing.h"
19 #include "src/wasm/wasm-module.h" 20 #include "src/wasm/wasm-module.h"
20 21
21 namespace v8 { 22 namespace v8 {
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 isolate, Object::OrdinaryHasInstance(isolate, callable, object)); 486 isolate, Object::OrdinaryHasInstance(isolate, callable, object));
486 } 487 }
487 488
488 RUNTIME_FUNCTION(Runtime_Typeof) { 489 RUNTIME_FUNCTION(Runtime_Typeof) {
489 HandleScope scope(isolate); 490 HandleScope scope(isolate);
490 DCHECK_EQ(1, args.length()); 491 DCHECK_EQ(1, args.length());
491 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 492 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
492 return *Object::TypeOf(isolate, object); 493 return *Object::TypeOf(isolate, object);
493 } 494 }
494 495
496 RUNTIME_FUNCTION(Runtime_AllowDynamicFunction) {
497 HandleScope scope(isolate);
498 DCHECK_EQ(1, args.length());
499 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0);
500 Handle<JSObject> global_proxy(target->global_proxy(), isolate);
501 return *isolate->factory()->ToBoolean(
502 Builtins::AllowDynamicFunction(isolate, target, global_proxy));
503 }
504
495 } // namespace internal 505 } // namespace internal
496 } // namespace v8 506 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/cross-realm-filtering.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698