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

Unified Diff: Source/core/frame/Location.h

Issue 1048133002: [bindings] Remove custom bindings required for Location.valueOf (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 | « Source/bindings/core/v8/custom/custom.gypi ('k') | Source/core/frame/Location.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/Location.h
diff --git a/Source/core/frame/Location.h b/Source/core/frame/Location.h
index 1ad7e3854359154db9728146485d3b8bfc679908..72421d659d854d54e77c58343917e3efd2165c05 100644
--- a/Source/core/frame/Location.h
+++ b/Source/core/frame/Location.h
@@ -29,6 +29,7 @@
#ifndef Location_h
#define Location_h
+#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/DOMStringList.h"
#include "core/frame/DOMWindowProperty.h"
@@ -83,6 +84,11 @@ public:
PassRefPtrWillBeRawPtr<DOMStringList> ancestorOrigins() const;
+ // Just return the |this| object the way the normal valueOf function on the Object prototype would.
+ // The valueOf function is only added to make sure that it cannot be overwritten on location
+ // objects, since that would provide a hook to change the string conversion behavior of location objects.
+ ScriptValue valueOf(const ScriptValue& thisObject) { return thisObject; }
+
DECLARE_VIRTUAL_TRACE();
private:
« no previous file with comments | « Source/bindings/core/v8/custom/custom.gypi ('k') | Source/core/frame/Location.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698