| 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 6706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6717 void v8::Isolate::LowMemoryNotification() { | 6717 void v8::Isolate::LowMemoryNotification() { |
| 6718 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6718 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6719 { | 6719 { |
| 6720 i::HistogramTimerScope idle_notification_scope( | 6720 i::HistogramTimerScope idle_notification_scope( |
| 6721 isolate->counters()->gc_low_memory_notification()); | 6721 isolate->counters()->gc_low_memory_notification()); |
| 6722 isolate->heap()->CollectAllAvailableGarbage("low memory notification"); | 6722 isolate->heap()->CollectAllAvailableGarbage("low memory notification"); |
| 6723 } | 6723 } |
| 6724 } | 6724 } |
| 6725 | 6725 |
| 6726 | 6726 |
| 6727 int v8::Isolate::ContextDisposedNotification() { | 6727 void v8::Isolate::ContextDisposedNotification() { |
| 6728 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6728 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6729 return isolate->heap()->NotifyContextDisposed(); | 6729 isolate->heap()->NotifyContextDisposed(); |
| 6730 } | 6730 } |
| 6731 | 6731 |
| 6732 | 6732 |
| 6733 String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) | 6733 String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) |
| 6734 : str_(NULL), length_(0) { | 6734 : str_(NULL), length_(0) { |
| 6735 i::Isolate* isolate = i::Isolate::Current(); | 6735 i::Isolate* isolate = i::Isolate::Current(); |
| 6736 if (obj.IsEmpty()) return; | 6736 if (obj.IsEmpty()) return; |
| 6737 ENTER_V8(isolate); | 6737 ENTER_V8(isolate); |
| 6738 i::HandleScope scope(isolate); | 6738 i::HandleScope scope(isolate); |
| 6739 TryCatch try_catch; | 6739 TryCatch try_catch; |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7623 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7623 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7624 Address callback_address = | 7624 Address callback_address = |
| 7625 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7625 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7626 VMState<EXTERNAL> state(isolate); | 7626 VMState<EXTERNAL> state(isolate); |
| 7627 ExternalCallbackScope call_scope(isolate, callback_address); | 7627 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7628 callback(info); | 7628 callback(info); |
| 7629 } | 7629 } |
| 7630 | 7630 |
| 7631 | 7631 |
| 7632 } } // namespace v8::internal | 7632 } } // namespace v8::internal |
| OLD | NEW |