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

Side by Side Diff: src/api.cc

Issue 2624973003: [heap] Add API function for checking if the heap limit was increased (Closed)
Patch Set: fix comment Created 3 years, 11 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 | « include/v8.h ('k') | src/heap/heap.h » ('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 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 8478 matching lines...) Expand 10 before | Expand all | Expand 10 after
8489 void Isolate::IncreaseHeapLimitForDebugging() { 8489 void Isolate::IncreaseHeapLimitForDebugging() {
8490 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8490 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8491 isolate->heap()->IncreaseHeapLimitForDebugging(); 8491 isolate->heap()->IncreaseHeapLimitForDebugging();
8492 } 8492 }
8493 8493
8494 void Isolate::RestoreOriginalHeapLimit() { 8494 void Isolate::RestoreOriginalHeapLimit() {
8495 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8495 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8496 isolate->heap()->RestoreOriginalHeapLimit(); 8496 isolate->heap()->RestoreOriginalHeapLimit();
8497 } 8497 }
8498 8498
8499 bool Isolate::IsHeapLimitIncreasedForDebugging() {
8500 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8501 return isolate->heap()->IsHeapLimitIncreasedForDebugging();
8502 }
8503
8499 void Isolate::SetJitCodeEventHandler(JitCodeEventOptions options, 8504 void Isolate::SetJitCodeEventHandler(JitCodeEventOptions options,
8500 JitCodeEventHandler event_handler) { 8505 JitCodeEventHandler event_handler) {
8501 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 8506 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
8502 // Ensure that logging is initialized for our isolate. 8507 // Ensure that logging is initialized for our isolate.
8503 isolate->InitializeLoggingAndCounters(); 8508 isolate->InitializeLoggingAndCounters();
8504 isolate->logger()->SetCodeEventHandler(options, event_handler); 8509 isolate->logger()->SetCodeEventHandler(options, event_handler);
8505 } 8510 }
8506 8511
8507 8512
8508 void Isolate::SetStackLimit(uintptr_t stack_limit) { 8513 void Isolate::SetStackLimit(uintptr_t stack_limit) {
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
9976 Address callback_address = 9981 Address callback_address =
9977 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9982 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9978 VMState<EXTERNAL> state(isolate); 9983 VMState<EXTERNAL> state(isolate);
9979 ExternalCallbackScope call_scope(isolate, callback_address); 9984 ExternalCallbackScope call_scope(isolate, callback_address);
9980 callback(info); 9985 callback(info);
9981 } 9986 }
9982 9987
9983 9988
9984 } // namespace internal 9989 } // namespace internal
9985 } // namespace v8 9990 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698