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

Unified Diff: third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Work for yuki's comments Created 3 years, 6 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
Index: third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp
diff --git a/third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp b/third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp
index c384ee2b6d01f91718559fbf06869a8effd647a2..03830ac8c87658bdd729312876c4e0447e5f4bab 100644
--- a/third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp
+++ b/third_party/WebKit/Source/platform/bindings/ScriptWrappableVisitor.cpp
@@ -94,13 +94,14 @@ void ScriptWrappableVisitor::PerformCleanup() {
void ScriptWrappableVisitor::ScheduleIdleLazyCleanup() {
// Some threads (e.g. PPAPI thread) don't have a scheduler.
- if (!Platform::Current()->CurrentThread()->Scheduler())
+ WebThread* current_thread = Platform::Current()->CurrentThread();
Yuki 2017/06/23 15:20:45 Once CurrentThread() is implemented, we should rev
peria 2017/06/27 09:52:37 Done.
+ if (!current_thread || !current_thread->Scheduler())
return;
if (idle_cleanup_task_scheduled_)
return;
- Platform::Current()->CurrentThread()->Scheduler()->PostIdleTask(
+ current_thread->Scheduler()->PostIdleTask(
BLINK_FROM_HERE, WTF::Bind(&ScriptWrappableVisitor::PerformLazyCleanup,
WTF::Unretained(this)));
idle_cleanup_task_scheduled_ = true;

Powered by Google App Engine
This is Rietveld 408576698