forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Don't cache property accesses on WindowProxy
Since the underlying HTML::Window can change, caching property accesses on WindowProxy is not as simple as remembering the shape. Let's disable caching here for now. We can come back to it in the future when we have no low-hanging fruit left. :^) Fixes an assertion failure on https://twinings.co.uk/
- Loading branch information
1 parent
dbb018e
commit 9a9c8c8
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
Tests/LibWeb/Text/expected/window-proxy-property-inline-cache.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
123 | ||
undefined |
13 changes: 13 additions & 0 deletions
13
Tests/LibWeb/Text/input/window-proxy-property-inline-cache.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script src="include.js"></script> | ||
<script> | ||
test(() => { | ||
function ic(o) { | ||
return o.foo | ||
} | ||
|
||
window.foo = 123 | ||
println(ic(window)) | ||
delete window.foo | ||
println(ic(window)) | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters