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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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/bindings/core/v8/ScriptState.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptState.h b/third_party/WebKit/Source/bindings/core/v8/ScriptState.h
index b5555e2ea2f19adcb5cd565d6651efc94f73045b..58d48a95e76a71605454f6145ac56731c29057e6 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptState.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptState.h
@@ -9,6 +9,7 @@
#include "bindings/core/v8/V8PerContextData.h"
#include "core/CoreExport.h"
#include "wtf/RefCounted.h"
+#include <memory>
#include <v8-debug.h>
#include <v8.h>
@@ -115,11 +116,11 @@ private:
// This RefPtr doesn't cause a cycle because all persistent handles that DOMWrapperWorld holds are weak.
RefPtr<DOMWrapperWorld> m_world;
- // This OwnPtr causes a cycle:
- // V8PerContextData --(Persistent)--> v8::Context --(RefPtr)--> ScriptState --(OwnPtr)--> V8PerContextData
- // So you must explicitly clear the OwnPtr by calling disposePerContextData()
+ // This std::unique_ptr causes a cycle:
+ // V8PerContextData --(Persistent)--> v8::Context --(RefPtr)--> ScriptState --(std::unique_ptr)--> V8PerContextData
+ // So you must explicitly clear the std::unique_ptr by calling disposePerContextData()
// once you no longer need V8PerContextData. Otherwise, the v8::Context will leak.
- OwnPtr<V8PerContextData> m_perContextData;
+ std::unique_ptr<V8PerContextData> m_perContextData;
#if ENABLE(ASSERT)
bool m_globalObjectDetached;

Powered by Google App Engine
This is Rietveld 408576698