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

Unified Diff: src/api.cc

Issue 3545004: [Isolates] Avoid isolate lookup in HandleScope destructor. (Closed)
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« include/v8.h ('K') | « include/v8.h ('k') | src/handles-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 63d92b0050c097cf9420c521a8f6485300bdd79a..72e9c309b933397ade432feea2a35df4613c3767 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4837,13 +4837,14 @@ void HandleScopeImplementer::FreeThreadResources() {
char* HandleScopeImplementer::ArchiveThread(char* storage) {
+ Isolate* isolate = Isolate::Current();
v8::ImplementationUtilities::HandleScopeData* current =
- Isolate::Current()->handle_scope_data();
+ isolate->handle_scope_data();
handle_scope_data_ = *current;
memcpy(storage, this, sizeof(*this));
ResetAfterArchive();
- current->Initialize();
+ current->Initialize(isolate);
return storage + ArchiveSpacePerThread();
}
« include/v8.h ('K') | « include/v8.h ('k') | src/handles-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698