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

Unified Diff: mojo/edk/js/waiting_callback.h

Issue 734633004: Fix WaitingCallback to not run JavaScript during GC (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | mojo/edk/js/waiting_callback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/js/waiting_callback.h
diff --git a/mojo/edk/js/waiting_callback.h b/mojo/edk/js/waiting_callback.h
index 6b2ccc73dcadef40eeb613ececc396ed0577a243..5a9dfaffa884cbbb26f83c2a9bdb0cfe09b05edf 100644
--- a/mojo/edk/js/waiting_callback.h
+++ b/mojo/edk/js/waiting_callback.h
@@ -5,6 +5,7 @@
#ifndef MOJO_EDK_JS_WAITING_CALLBACK_H_
#define MOJO_EDK_JS_WAITING_CALLBACK_H_
+#include "base/memory/weak_ptr.h"
#include "gin/handle.h"
#include "gin/runner.h"
#include "gin/wrappable.h"
@@ -49,10 +50,14 @@ class WaitingCallback : public gin::Wrappable<WaitingCallback>,
// still in progress.
void OnWillCloseHandle() override;
+ void ClearWaitId();
+ void CallCallback(MojoResult result);
+
base::WeakPtr<gin::Runner> runner_;
MojoAsyncWaitID wait_id_;
HandleWrapper* handle_wrapper_;
+ base::WeakPtrFactory<WaitingCallback> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(WaitingCallback);
};
« no previous file with comments | « no previous file | mojo/edk/js/waiting_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698