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

Side by Side Diff: src/api.cc

Issue 1344823002: Version 4.6.85.17 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.6
Patch Set: Created 5 years, 3 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-version.h ('k') | src/heap/heap.cc » ('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 6855 matching lines...) Expand 10 before | Expand all | Expand 10 after
6866 return Integer::New(isolate, static_cast<int32_t>(value)); 6866 return Integer::New(isolate, static_cast<int32_t>(value));
6867 } 6867 }
6868 ENTER_V8(internal_isolate); 6868 ENTER_V8(internal_isolate);
6869 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); 6869 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value);
6870 return Utils::IntegerToLocal(result); 6870 return Utils::IntegerToLocal(result);
6871 } 6871 }
6872 6872
6873 6873
6874 void Isolate::CollectAllGarbage(const char* gc_reason) { 6874 void Isolate::CollectAllGarbage(const char* gc_reason) {
6875 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); 6875 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap();
6876 DCHECK_EQ(heap->gc_state(), i::Heap::NOT_IN_GC);
6876 if (heap->incremental_marking()->IsStopped()) { 6877 if (heap->incremental_marking()->IsStopped()) {
6877 if (heap->incremental_marking()->CanBeActivated()) { 6878 if (heap->incremental_marking()->CanBeActivated()) {
6878 heap->StartIncrementalMarking( 6879 heap->StartIncrementalMarking(
6879 i::Heap::kNoGCFlags, 6880 i::Heap::kNoGCFlags,
6880 kGCCallbackFlagSynchronousPhantomCallbackProcessing, gc_reason); 6881 kGCCallbackFlagSynchronousPhantomCallbackProcessing, gc_reason);
6881 } else { 6882 } else {
6882 heap->CollectAllGarbage( 6883 heap->CollectAllGarbage(
6883 i::Heap::kNoGCFlags, gc_reason, 6884 i::Heap::kNoGCFlags, gc_reason,
6884 kGCCallbackFlagSynchronousPhantomCallbackProcessing); 6885 kGCCallbackFlagSynchronousPhantomCallbackProcessing);
6885 } 6886 }
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
8408 Address callback_address = 8409 Address callback_address =
8409 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8410 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8410 VMState<EXTERNAL> state(isolate); 8411 VMState<EXTERNAL> state(isolate);
8411 ExternalCallbackScope call_scope(isolate, callback_address); 8412 ExternalCallbackScope call_scope(isolate, callback_address);
8412 callback(info); 8413 callback(info);
8413 } 8414 }
8414 8415
8415 8416
8416 } // namespace internal 8417 } // namespace internal
8417 } // namespace v8 8418 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698