|
V8AbstractEventListener should hold a ScriptState
- Basically, this CL replaces V8AbstractEventListener::m_world with V8AbstractEventListener::m_scriptState.
- This CL uses the ScriptState in a lot of places about event listeners and cleans up the code (for example, this CL removes an empty creation context from toV8()).
- The complicated part is that V8LazyEventListener does not know the ScriptState when it's created. Thus, V8AbstractEventListener::m_scriptState can be null if the listener is a V8LazyEventListener until the V8LazyEventListener is called back from Blink (i.e., either of handleEvent(), callListenerFunction() and getEventListener() is called).
- This CL changes web-exposed behavior. In a case where the frame that registered an onload event handler (say Frame1) is different from the frame that triggers the onload event (Frame2), before this CL, the onload event handler is invoked in the context of Frame2. After this CL, the onload event handler is not triggered if Frame1 != Frame2. This behavior is not speced but aligns with Firefox. See comment #17 and #19 for more details.
BUG= 357144
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175241
Total comments: 2
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+174 lines, -228 lines) |
Patch |
 |
D |
LayoutTests/fast/dom/resources/set-frame-src-while-running-script-in-frame.html
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
D |
LayoutTests/fast/dom/resources/xmlhttprequest-constructor-in-detached-document-frame.html
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -20 lines |
0 comments
|
Download
|
 |
D |
LayoutTests/fast/dom/set-frame-src-while-running-script-in-frame.html
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -13 lines |
0 comments
|
Download
|
 |
D |
LayoutTests/fast/dom/xmlhttprequest-constructor-in-detached-document.html
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -17 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/scripts/v8_attributes.py
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8AbstractEventListener.h
|
View
|
1
2
|
2 chunks |
+15 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8AbstractEventListener.cpp
|
View
|
1
2
3
4
5
|
5 chunks |
+34 lines, -35 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8ErrorHandler.h
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8ErrorHandler.cpp
|
View
|
1
2
3
4
5
|
2 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8EventListener.h
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8EventListener.cpp
|
View
|
1
2
3
4
5
|
2 chunks |
+9 lines, -13 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8EventListenerList.h
|
View
|
|
4 chunks |
+12 lines, -11 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8EventListenerList.cpp
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8LazyEventListener.h
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8LazyEventListener.cpp
|
View
|
1
2
3
4
5
6
|
8 chunks |
+45 lines, -38 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8WorkerGlobalScopeEventListener.h
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp
|
View
|
1
2
3
4
5
|
2 chunks |
+20 lines, -31 lines |
0 comments
|
Download
|
 |
M |
Source/web/tests/CustomEventTest.cpp
|
View
|
1
2
3
4
|
3 chunks |
+9 lines, -12 lines |
0 comments
|
Download
|
Total messages: 26 (0 generated)
|