|
Make 'any'-typed attributes of events available in isolated worlds
Before r153701, event attributes of type 'any' were freely-shared between isolated worlds.
But since that patch, accessing those attributes from other worlds always returns null.
This patch re-enables isolated worlds to communicate via custom-constructed events
without leaking object identity by using SerializedScriptValue to clone 'any' attributes.
When an event is constructed in an isolated world, we eagerly make a clone of its 'any' attributes.
This is mostly for expediency: it would otherwise be tricky to find the original data, as it will
be hanging off some wrapper in some world, but we wouldn't know which world to look in.
But for the main world, since all these events are ScriptWrappable, we lazily clone.
This is both for performance reasons and to avoid any side-effects of cloning
(such as calling setters) until the event is actually accessed in another world.
BUG= 260378
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154535
Total comments: 20
Total comments: 1
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+281 lines, -56 lines) |
Patch |
 |
A |
LayoutTests/fast/events/event-isolated-world-clone.html
|
View
|
1
2
3
|
1 chunk |
+40 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/events/event-isolated-world-clone-expected.txt
|
View
|
1
2
3
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/events/init-custom-event-isolated-world.html
|
View
|
1
2
3
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/events/init-custom-event-isolated-world-expected.txt
|
View
|
1
2
3
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/events/init-message-event-isolated-world.html
|
View
|
1
2
3
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/fast/events/init-message-event-isolated-world-expected.txt
|
View
|
1
2
3
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/deprecated_code_generator_v8.pm
|
View
|
1
2
3
4
|
3 chunks |
+44 lines, -17 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/ScriptValue.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/ScriptWrappable.h
|
View
|
1
2
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/SerializedScriptValue.h
|
View
|
1
2
3
|
3 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/SerializedScriptValue.cpp
|
View
|
1
2
3
|
4 chunks |
+13 lines, -14 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8Binding.h
|
View
|
1
2
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8Binding.cpp
|
View
|
1
2
3
4
|
1 chunk |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/custom/V8CustomEventCustom.cpp
|
View
|
1
2
3
4
|
3 chunks |
+17 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/custom/V8MessageEventCustom.cpp
|
View
|
1
2
3
4
|
2 chunks |
+19 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/custom/V8PopStateEventCustom.cpp
|
View
|
1
2
3
4
|
2 chunks |
+14 lines, -2 lines |
3 comments
|
Download
|
 |
M |
Source/core/dom/CustomEvent.h
|
View
|
1
2
3
|
2 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/CustomEvent.cpp
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/MessageEvent.h
|
View
|
1
2
3
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/dom/PopStateEvent.h
|
View
|
1
2
3
|
2 chunks |
+7 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/PopStateEvent.cpp
|
View
|
1
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/web/WebSerializedScriptValue.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 15 (0 generated)
|