diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2016-04-07 14:06:55 -0700 |
---|---|---|
committer | Ali Ijaz Sheikh <ofrobots@google.com> | 2016-04-14 10:03:39 -0700 |
commit | 52af5c4eebf4de8638aef0338bd826656312a02a (patch) | |
tree | 628dc9fb0b558c3a73a2160706fef368876fe548 /deps/v8/src/global-handles.cc | |
parent | 6e3e8acc7cc7ebd3d67db5ade1247b8b558efe09 (diff) | |
download | android-node-v8-52af5c4eebf4de8638aef0338bd826656312a02a.tar.gz android-node-v8-52af5c4eebf4de8638aef0338bd826656312a02a.tar.bz2 android-node-v8-52af5c4eebf4de8638aef0338bd826656312a02a.zip |
deps: upgrade V8 to 5.0.71.32
* Pick up the branch head for V8 5.0 stable [1]
* Edit v8 gitignore to allow trace_event copy
* Update V8 DEP trace_event as per deps/v8/DEPS [2]
[1] https://chromium.googlesource.com/v8/v8.git/+/3c67831
[2] https://chromium.googlesource.com/chromium/src/base/trace_event/common/+/4b09207e447ae5bd34643b4c6321bee7b76d35f9
Ref: https://github.com/nodejs/node/pull/5945
PR-URL: https://github.com/nodejs/node/pull/6111
Reviewed-By: targos - Michaƫl Zasso <mic.besace@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Diffstat (limited to 'deps/v8/src/global-handles.cc')
-rw-r--r-- | deps/v8/src/global-handles.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/deps/v8/src/global-handles.cc b/deps/v8/src/global-handles.cc index 4a7292547f..edd52b0ceb 100644 --- a/deps/v8/src/global-handles.cc +++ b/deps/v8/src/global-handles.cc @@ -817,8 +817,6 @@ void GlobalHandles::InvokeSecondPassPhantomCallbacks( while (callbacks->length() != 0) { auto callback = callbacks->RemoveLast(); DCHECK(callback.node() == nullptr); - // No second pass callback required. - if (callback.callback() == nullptr) continue; // Fire second pass callback callback.Invoke(isolate); } @@ -924,6 +922,7 @@ void GlobalHandles::UpdateListOfNewSpaceNodes() { int GlobalHandles::DispatchPendingPhantomCallbacks( bool synchronous_second_pass) { int freed_nodes = 0; + List<PendingPhantomCallback> second_pass_callbacks; { // The initial pass callbacks must simply clear the nodes. for (auto i = pending_phantom_callbacks_.begin(); @@ -932,24 +931,25 @@ int GlobalHandles::DispatchPendingPhantomCallbacks( // Skip callbacks that have already been processed once. if (callback->node() == nullptr) continue; callback->Invoke(isolate()); + if (callback->callback()) second_pass_callbacks.Add(*callback); freed_nodes++; } } - if (pending_phantom_callbacks_.length() > 0) { + pending_phantom_callbacks_.Clear(); + if (second_pass_callbacks.length() > 0) { if (FLAG_optimize_for_size || FLAG_predictable || synchronous_second_pass) { isolate()->heap()->CallGCPrologueCallbacks( GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags); - InvokeSecondPassPhantomCallbacks(&pending_phantom_callbacks_, isolate()); + InvokeSecondPassPhantomCallbacks(&second_pass_callbacks, isolate()); isolate()->heap()->CallGCEpilogueCallbacks( GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags); } else { auto task = new PendingPhantomCallbacksSecondPassTask( - &pending_phantom_callbacks_, isolate()); + &second_pass_callbacks, isolate()); V8::GetCurrentPlatform()->CallOnForegroundThread( reinterpret_cast<v8::Isolate*>(isolate()), task); } } - pending_phantom_callbacks_.Clear(); return freed_nodes; } @@ -984,7 +984,7 @@ int GlobalHandles::PostGarbageCollectionProcessing( int freed_nodes = 0; bool synchronous_second_pass = (gc_callback_flags & - (kGCCallbackFlagForced | + (kGCCallbackFlagForced | kGCCallbackFlagCollectAllAvailableGarbage | kGCCallbackFlagSynchronousPhantomCallbackProcessing)) != 0; freed_nodes += DispatchPendingPhantomCallbacks(synchronous_second_pass); if (initial_post_gc_processing_count != post_gc_processing_count_) { |