| 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 "bootstrapper.h" | 5 #include "bootstrapper.h" |
| 6 | 6 |
| 7 #include "accessors.h" | 7 #include "accessors.h" |
| 8 #include "isolate-inl.h" | 8 #include "isolate-inl.h" |
| 9 #include "natives.h" | 9 #include "natives.h" |
| 10 #include "snapshot.h" | 10 #include "snapshot.h" |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 ExperimentalNatives::GetRawScriptSource(index)), | 1468 ExperimentalNatives::GetRawScriptSource(index)), |
| 1469 false); | 1469 false); |
| 1470 return CompileNative(isolate, name, source_code); | 1470 return CompileNative(isolate, name, source_code); |
| 1471 } | 1471 } |
| 1472 | 1472 |
| 1473 | 1473 |
| 1474 bool Genesis::CompileNative(Isolate* isolate, | 1474 bool Genesis::CompileNative(Isolate* isolate, |
| 1475 Vector<const char> name, | 1475 Vector<const char> name, |
| 1476 Handle<String> source) { | 1476 Handle<String> source) { |
| 1477 HandleScope scope(isolate); | 1477 HandleScope scope(isolate); |
| 1478 Debugger::IgnoreScope compiling_natives(isolate->debugger()); | 1478 SuppressDebug compiling_natives(isolate->debug()); |
| 1479 // During genesis, the boilerplate for stack overflow won't work until the | 1479 // During genesis, the boilerplate for stack overflow won't work until the |
| 1480 // environment has been at least partially initialized. Add a stack check | 1480 // environment has been at least partially initialized. Add a stack check |
| 1481 // before entering JS code to catch overflow early. | 1481 // before entering JS code to catch overflow early. |
| 1482 StackLimitCheck check(isolate); | 1482 StackLimitCheck check(isolate); |
| 1483 if (check.HasOverflowed()) return false; | 1483 if (check.HasOverflowed()) return false; |
| 1484 | 1484 |
| 1485 bool result = CompileScriptCached(isolate, | 1485 bool result = CompileScriptCached(isolate, |
| 1486 name, | 1486 name, |
| 1487 source, | 1487 source, |
| 1488 NULL, | 1488 NULL, |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2699 return from + sizeof(NestingCounterType); | 2699 return from + sizeof(NestingCounterType); |
| 2700 } | 2700 } |
| 2701 | 2701 |
| 2702 | 2702 |
| 2703 // Called when the top-level V8 mutex is destroyed. | 2703 // Called when the top-level V8 mutex is destroyed. |
| 2704 void Bootstrapper::FreeThreadResources() { | 2704 void Bootstrapper::FreeThreadResources() { |
| 2705 ASSERT(!IsActive()); | 2705 ASSERT(!IsActive()); |
| 2706 } | 2706 } |
| 2707 | 2707 |
| 2708 } } // namespace v8::internal | 2708 } } // namespace v8::internal |
| OLD | NEW |