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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/SharedPersistent.h

Issue 1416163003: Reland "Don't report promise rejection events during the microtask checkpoint" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/bindings/core/v8/SharedPersistent.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/SharedPersistent.h b/third_party/WebKit/Source/bindings/core/v8/SharedPersistent.h
index 69d3a3baabeeb2f52372d17137cb64779b07ed09..5dc54b3cfa449bf9dd7cdce1b4570a4dc59944da 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SharedPersistent.h
+++ b/third_party/WebKit/Source/bindings/core/v8/SharedPersistent.h
@@ -64,6 +64,17 @@ public:
return m_value == other.m_value;
}
+ template<typename P>
+ void setWeak(P* parameters, void (*callback)(const v8::WeakCallbackInfo<P>&), v8::WeakCallbackType type = v8::WeakCallbackType::kParameter)
+ {
+ m_value.setWeak(parameters, callback, type);
+ }
+
+ void clearWeak()
+ {
+ m_value.clearWeak();
+ }
+
private:
explicit SharedPersistent(v8::Local<T> value, v8::Isolate* isolate) : m_value(isolate, value) { }
ScopedPersistent<T> m_value;

Powered by Google App Engine
This is Rietveld 408576698