How to rebuild chromium to change object default configurable property

37 views
Skip to first unread message

An Ha

unread,
Mar 5, 2023, 2:20:27 PM3/5/23
to Chromium-discuss

I am looking for a way to add additional logic when a javascript script makes call to window.location, e.g add logic when calling getter of window.location through a Proxy or redefine with Object.defineProperties. When checking default js code as in Object.getOwnPropertyDescriptor(window,'location') we got the property {configurable: false}. Are there any way theoretically, by modifying the source code of a javacript engine and its C++ object implementation ( like Chrome v8 engine with the comment idea in data_object_builder.h : "Constructs a JavaScript object with a series of data properties. (As with default data properties in JavaScript, these properties are configurable, writable and enumerable.)"

https://github.com/chromium/chromium/blob/b698c15c43d9d7db4d1aa99119af5d0a34af4249/gin/data_object_builder.h#L18), to make the location object configurable (true) in my own browser build?


Reply all
Reply to author
Forward
0 new messages