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

Side by Side Diff: src/bootstrapper.cc

Issue 1154483002: Hook up more import/exports in natives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: do not leak utils object Created 5 years, 7 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/arraybuffer.js ('k') | src/collection.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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 } 1517 }
1518 1518
1519 1519
1520 bool Genesis::CallUtilsFunction(Isolate* isolate, const char* name) { 1520 bool Genesis::CallUtilsFunction(Isolate* isolate, const char* name) {
1521 Handle<JSObject> utils = 1521 Handle<JSObject> utils =
1522 Handle<JSObject>::cast(isolate->natives_utils_object()); 1522 Handle<JSObject>::cast(isolate->natives_utils_object());
1523 Handle<String> name_string = 1523 Handle<String> name_string =
1524 isolate->factory()->NewStringFromAsciiChecked(name); 1524 isolate->factory()->NewStringFromAsciiChecked(name);
1525 Handle<Object> fun = JSObject::GetDataProperty(utils, name_string); 1525 Handle<Object> fun = JSObject::GetDataProperty(utils, name_string);
1526 Handle<Object> receiver = isolate->factory()->undefined_value(); 1526 Handle<Object> receiver = isolate->factory()->undefined_value();
1527 return !Execution::Call(isolate, fun, receiver, 0, NULL).is_null(); 1527 Handle<Object> args[] = {utils};
1528 return !Execution::Call(isolate, fun, receiver, 1, args).is_null();
1528 } 1529 }
1529 1530
1530 1531
1531 bool Genesis::CompileExtension(Isolate* isolate, v8::Extension* extension) { 1532 bool Genesis::CompileExtension(Isolate* isolate, v8::Extension* extension) {
1532 Factory* factory = isolate->factory(); 1533 Factory* factory = isolate->factory();
1533 HandleScope scope(isolate); 1534 HandleScope scope(isolate);
1534 Handle<SharedFunctionInfo> function_info; 1535 Handle<SharedFunctionInfo> function_info;
1535 1536
1536 Handle<String> source = 1537 Handle<String> source =
1537 isolate->factory() 1538 isolate->factory()
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
2416 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ 2417 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \
2417 } \ 2418 } \
2418 } \ 2419 } \
2419 } 2420 }
2420 HARMONY_INPROGRESS(INSTALL_EXPERIMENTAL_NATIVES); 2421 HARMONY_INPROGRESS(INSTALL_EXPERIMENTAL_NATIVES);
2421 HARMONY_STAGED(INSTALL_EXPERIMENTAL_NATIVES); 2422 HARMONY_STAGED(INSTALL_EXPERIMENTAL_NATIVES);
2422 HARMONY_SHIPPING(INSTALL_EXPERIMENTAL_NATIVES); 2423 HARMONY_SHIPPING(INSTALL_EXPERIMENTAL_NATIVES);
2423 #undef INSTALL_EXPERIMENTAL_NATIVES 2424 #undef INSTALL_EXPERIMENTAL_NATIVES
2424 } 2425 }
2425 2426
2427 CallUtilsFunction(isolate(), "PostExperimentals");
2428
2426 InstallExperimentalNativeFunctions(); 2429 InstallExperimentalNativeFunctions();
2427 return true; 2430 return true;
2428 } 2431 }
2429 2432
2430 2433
2431 bool Genesis::InstallExtraNatives() { 2434 bool Genesis::InstallExtraNatives() {
2432 for (int i = ExtraNatives::GetDebuggerCount(); 2435 for (int i = ExtraNatives::GetDebuggerCount();
2433 i < ExtraNatives::GetBuiltinsCount(); i++) { 2436 i < ExtraNatives::GetBuiltinsCount(); i++) {
2434 if (!CompileExtraBuiltin(isolate(), i)) return false; 2437 if (!CompileExtraBuiltin(isolate(), i)) return false;
2435 } 2438 }
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
3045 return from + sizeof(NestingCounterType); 3048 return from + sizeof(NestingCounterType);
3046 } 3049 }
3047 3050
3048 3051
3049 // Called when the top-level V8 mutex is destroyed. 3052 // Called when the top-level V8 mutex is destroyed.
3050 void Bootstrapper::FreeThreadResources() { 3053 void Bootstrapper::FreeThreadResources() {
3051 DCHECK(!IsActive()); 3054 DCHECK(!IsActive());
3052 } 3055 }
3053 3056
3054 } } // namespace v8::internal 3057 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arraybuffer.js ('k') | src/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698