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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 2826393004: v8binding: Makes Location's wrapper objects alive, really. (Closed)
Patch Set: Added a layout test. Created 3 years, 8 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/custom/V8WindowCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
index 2f4c84c920020006ea7928839e18aaf1a9fdb334..327e8b0f5a33c5b393cedc95ade51ff03b41d81a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -75,8 +75,7 @@ void V8Window::locationAttributeGetterCustom(
Location* location = window->location();
DCHECK(location);
- // Keep the wrapper object for the return value alive as long as |this|
- // object is alive in order to save creation time of the wrapper object.
+ // If we have already created a wrapper object in this world, returns it.
if (DOMDataStore::SetReturnValue(info.GetReturnValue(), location))
return;
@@ -101,17 +100,6 @@ void V8Window::locationAttributeGetterCustom(
wrapper = ToV8(location, holder, isolate);
}
- // Keep the wrapper object for the return value alive as long as |this|
- // object is alive in order to save creation time of the wrapper object.
- //
- // TODO(dcheng): The hidden reference behavior is broken in many ways. We
- // should be caching for all DOM attributes. Even if it's not critical for
- // remote Location objects, we should clean this up to improve
- // maintainability. In the long-term, this will be superseded by wrapper
- // tracing.
- V8PrivateProperty::GetSymbol(isolate, "KeepAlive#Window#location")
- .Set(holder, wrapper);
-
V8SetReturnValue(info, wrapper);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/bindings/location-lifetime.html ('k') | third_party/WebKit/Source/core/frame/DOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698