| OLD | NEW |
| 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 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 StackLimitCheck check(isolate); | 1488 StackLimitCheck check(isolate); |
| 1489 if (check.HasOverflowed()) return false; | 1489 if (check.HasOverflowed()) return false; |
| 1490 | 1490 |
| 1491 Handle<Context> context(isolate->context()); | 1491 Handle<Context> context(isolate->context()); |
| 1492 | 1492 |
| 1493 Handle<String> script_name = | 1493 Handle<String> script_name = |
| 1494 isolate->factory()->NewStringFromUtf8(name).ToHandleChecked(); | 1494 isolate->factory()->NewStringFromUtf8(name).ToHandleChecked(); |
| 1495 Handle<SharedFunctionInfo> function_info = Compiler::CompileScript( | 1495 Handle<SharedFunctionInfo> function_info = Compiler::CompileScript( |
| 1496 source, script_name, 0, 0, false, false, Handle<Object>(), context, NULL, | 1496 source, script_name, 0, 0, false, false, Handle<Object>(), context, NULL, |
| 1497 NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE, false); | 1497 NULL, ScriptCompiler::kNoCompileOptions, NATIVES_CODE, false); |
| 1498 if (function_info.is_null()) return false; |
| 1498 | 1499 |
| 1499 DCHECK(context->IsNativeContext()); | 1500 DCHECK(context->IsNativeContext()); |
| 1500 | 1501 |
| 1501 Handle<Context> runtime_context(context->runtime_context()); | 1502 Handle<Context> runtime_context(context->runtime_context()); |
| 1502 Handle<JSBuiltinsObject> receiver(context->builtins()); | 1503 Handle<JSBuiltinsObject> receiver(context->builtins()); |
| 1503 Handle<JSFunction> fun = | 1504 Handle<JSFunction> fun = |
| 1504 isolate->factory()->NewFunctionFromSharedFunctionInfo(function_info, | 1505 isolate->factory()->NewFunctionFromSharedFunctionInfo(function_info, |
| 1505 runtime_context); | 1506 runtime_context); |
| 1506 | 1507 |
| 1507 // For non-extension scripts, run script to get the function wrapper. | 1508 // For non-extension scripts, run script to get the function wrapper. |
| (...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3035 return from + sizeof(NestingCounterType); | 3036 return from + sizeof(NestingCounterType); |
| 3036 } | 3037 } |
| 3037 | 3038 |
| 3038 | 3039 |
| 3039 // Called when the top-level V8 mutex is destroyed. | 3040 // Called when the top-level V8 mutex is destroyed. |
| 3040 void Bootstrapper::FreeThreadResources() { | 3041 void Bootstrapper::FreeThreadResources() { |
| 3041 DCHECK(!IsActive()); | 3042 DCHECK(!IsActive()); |
| 3042 } | 3043 } |
| 3043 | 3044 |
| 3044 } } // namespace v8::internal | 3045 } } // namespace v8::internal |
| OLD | NEW |