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

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

Issue 1293493003: Do not export natives to runtime via js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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') | src/v8natives.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
11 #include "src/messages.h" 11 #include "src/messages.h"
12 #include "src/parser.h" 12 #include "src/parser.h"
13 #include "src/prettyprinter.h" 13 #include "src/prettyprinter.h"
14 #include "src/runtime/runtime-utils.h" 14 #include "src/runtime/runtime-utils.h"
15 15
16 namespace v8 { 16 namespace v8 {
17 namespace internal { 17 namespace internal {
18 18
19 RUNTIME_FUNCTION(Runtime_CheckIsBootstrapping) { 19 RUNTIME_FUNCTION(Runtime_CheckIsBootstrapping) {
20 SealHandleScope shs(isolate); 20 SealHandleScope shs(isolate);
21 DCHECK(args.length() == 0); 21 DCHECK(args.length() == 0);
22 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); 22 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
23 return isolate->heap()->undefined_value(); 23 return isolate->heap()->undefined_value();
24 } 24 }
25 25
26 26
27 RUNTIME_FUNCTION(Runtime_ImportToRuntime) {
28 HandleScope scope(isolate);
29 DCHECK(args.length() == 1);
30 CONVERT_ARG_HANDLE_CHECKED(JSObject, container, 0);
31 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
32 Bootstrapper::ImportNatives(isolate, container);
33 return isolate->heap()->undefined_value();
34 }
35
36
37 RUNTIME_FUNCTION(Runtime_ImportExperimentalToRuntime) {
38 HandleScope scope(isolate);
39 DCHECK(args.length() == 1);
40 CONVERT_ARG_HANDLE_CHECKED(JSObject, container, 0);
41 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive());
42 Bootstrapper::ImportExperimentalNatives(isolate, container);
43 return isolate->heap()->undefined_value();
44 }
45
46
27 RUNTIME_FUNCTION(Runtime_Throw) { 47 RUNTIME_FUNCTION(Runtime_Throw) {
28 HandleScope scope(isolate); 48 HandleScope scope(isolate);
29 DCHECK(args.length() == 1); 49 DCHECK(args.length() == 1);
30 return isolate->Throw(args[0]); 50 return isolate->Throw(args[0]);
31 } 51 }
32 52
33 53
34 RUNTIME_FUNCTION(Runtime_ReThrow) { 54 RUNTIME_FUNCTION(Runtime_ReThrow) {
35 HandleScope scope(isolate); 55 HandleScope scope(isolate);
36 DCHECK(args.length() == 1); 56 DCHECK(args.length() == 1);
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 } 398 }
379 399
380 400
381 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) { 401 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) {
382 HandleScope shs(isolate); 402 HandleScope shs(isolate);
383 return isolate->heap()->code_stub_exports_object(); 403 return isolate->heap()->code_stub_exports_object();
384 } 404 }
385 405
386 } // namespace internal 406 } // namespace internal
387 } // namespace v8 407 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698