OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1577 | 1577 |
1578 // Support the old API for a transition period: | 1578 // Support the old API for a transition period: |
1579 // - kProduceToCache -> kProduceParserCache | 1579 // - kProduceToCache -> kProduceParserCache |
1580 // - kNoCompileOptions + cached_data != NULL -> kConsumeParserCache | 1580 // - kNoCompileOptions + cached_data != NULL -> kConsumeParserCache |
1581 if (options == kProduceDataToCache) { | 1581 if (options == kProduceDataToCache) { |
1582 options = kProduceParserCache; | 1582 options = kProduceParserCache; |
1583 } else if (options == kNoCompileOptions && source->cached_data) { | 1583 } else if (options == kNoCompileOptions && source->cached_data) { |
1584 options = kConsumeParserCache; | 1584 options = kConsumeParserCache; |
1585 } | 1585 } |
1586 | 1586 |
| 1587 // Don't try to produce any kind of cache when the debugger is loaded. |
| 1588 if (isolate->debug()->is_loaded() && |
| 1589 (options == kProduceParserCache || options == kProduceCodeCache)) { |
| 1590 options = kNoCompileOptions; |
| 1591 } |
| 1592 |
1587 i::ScriptData* script_data = NULL; | 1593 i::ScriptData* script_data = NULL; |
1588 if (options == kConsumeParserCache || options == kConsumeCodeCache) { | 1594 if (options == kConsumeParserCache || options == kConsumeCodeCache) { |
1589 DCHECK(source->cached_data); | 1595 DCHECK(source->cached_data); |
1590 // ScriptData takes care of pointer-aligning the data. | 1596 // ScriptData takes care of pointer-aligning the data. |
1591 script_data = new i::ScriptData(source->cached_data->data, | 1597 script_data = new i::ScriptData(source->cached_data->data, |
1592 source->cached_data->length); | 1598 source->cached_data->length); |
1593 } | 1599 } |
1594 | 1600 |
1595 i::Handle<i::String> str = Utils::OpenHandle(*(source->source_string)); | 1601 i::Handle<i::String> str = Utils::OpenHandle(*(source->source_string)); |
1596 LOG_API(isolate, "ScriptCompiler::CompileUnbound"); | 1602 LOG_API(isolate, "ScriptCompiler::CompileUnbound"); |
(...skipping 6098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7695 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7701 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7696 Address callback_address = | 7702 Address callback_address = |
7697 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7703 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7698 VMState<EXTERNAL> state(isolate); | 7704 VMState<EXTERNAL> state(isolate); |
7699 ExternalCallbackScope call_scope(isolate, callback_address); | 7705 ExternalCallbackScope call_scope(isolate, callback_address); |
7700 callback(info); | 7706 callback(info); |
7701 } | 7707 } |
7702 | 7708 |
7703 | 7709 |
7704 } } // namespace v8::internal | 7710 } } // namespace v8::internal |
OLD | NEW |