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

Unified Diff: gin/wrappable.cc

Issue 105423003: gin::Wrappable shouldn't inherit from base::RefCounted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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: gin/wrappable.cc
diff --git a/gin/wrappable.cc b/gin/wrappable.cc
index 5c7c629b7e4e50fd264255db70269af4ab82c582..cb652d6cbdc4480c132408f06a3d58bd10350dc7 100644
--- a/gin/wrappable.cc
+++ b/gin/wrappable.cc
@@ -26,7 +26,7 @@ void Wrappable::WeakCallback(
const v8::WeakCallbackData<v8::Object, Wrappable>& data) {
Wrappable* wrappable = data.GetParameter();
wrappable->wrapper_.Reset();
- wrappable->Release(); // Balanced in Wrappable::ConfigureWrapper.
+ delete wrappable;
}
v8::Handle<v8::Object> Wrappable::CreateWrapper(v8::Isolate* isolate) {
@@ -39,7 +39,6 @@ v8::Handle<v8::Object> Wrappable::CreateWrapper(v8::Isolate* isolate) {
wrapper->SetAlignedPointerInInternalField(kWrapperInfoIndex, info);
wrapper->SetAlignedPointerInInternalField(kEncodedValueIndex, this);
wrapper_.Reset(isolate, wrapper);
- AddRef(); // Balanced in Wrappable::WeakCallback.
wrapper_.SetWeak(this, WeakCallback);
return wrapper;
}
« gin/handle.h ('K') | « gin/wrappable.h ('k') | gin/wrappable_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698