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

Unified Diff: Source/bindings/core/v8/ScriptPromise.h

Issue 1223713003: Leak Detector: Add support for ScriptPromise on Blink side (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « LayoutTests/LeakExpectations ('k') | Source/bindings/core/v8/ScriptPromise.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptPromise.h
diff --git a/Source/bindings/core/v8/ScriptPromise.h b/Source/bindings/core/v8/ScriptPromise.h
index ff77ee04794079333926a4d4132616d6ceed9e14..a19373560caed8d69fbb147fa6e72597a487f887 100644
--- a/Source/bindings/core/v8/ScriptPromise.h
+++ b/Source/bindings/core/v8/ScriptPromise.h
@@ -50,12 +50,16 @@ class DOMException;
class CORE_EXPORT ScriptPromise final {
public:
// Constructs an empty promise.
- ScriptPromise() { }
+ ScriptPromise();
// Constructs a ScriptPromise from |promise|.
// If |promise| is not a Promise object, throws a v8 TypeError.
ScriptPromise(ScriptState*, v8::Local<v8::Value> promise);
+ ScriptPromise(const ScriptPromise&);
+
+ ~ScriptPromise();
+
ScriptPromise then(v8::Local<v8::Function> onFulfilled, v8::Local<v8::Function> onRejected = v8::Local<v8::Function>());
bool isObject() const
@@ -127,6 +131,8 @@ public:
static v8::Local<v8::Promise> rejectRaw(ScriptState*, v8::Local<v8::Value>);
+ static unsigned instanceCount() { return s_instanceCount; }
+
// This is a utility class intended to be used internally.
// ScriptPromiseResolver is for general purpose.
class CORE_EXPORT InternalResolver final {
@@ -145,6 +151,8 @@ public:
private:
RefPtr<ScriptState> m_scriptState;
ScriptValue m_promise;
+
+ static unsigned s_instanceCount;
};
} // namespace blink
« no previous file with comments | « LayoutTests/LeakExpectations ('k') | Source/bindings/core/v8/ScriptPromise.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698