|
Move the event attach/detach logic on unload from event.js to
event_bindings.cc.
This removes one of the reasons to call into JavaScript on context unload,
which can crash. It's also more robust; it's confusing trying to maintain a
data structure in JavaScript which reflects C++ state, which contributes to
bugs like crbug.com/474718.
Also clean up and formalise the script context invalidation system: CHECK
rather than guarding against multiple invalidations, only invalidate script
context related member variables, add an invalidation observer interface.
BUG= 474718, 475536
R=rdevlin.cronin@chromium.org
Committed: https://crrev.com/d99095034d2e88897ae82c8353f3327a3a1d03a5
Cr-Commit-Position: refs/heads/master@{#324933}
Total comments: 27
Total comments: 5
Total comments: 19
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+247 lines, -112 lines) |
Patch |
 |
M |
chrome/browser/extensions/events_apitest.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+43 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/test/data/extensions/api_test/events_are_unregistered/manifest.json
|
View
|
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
chrome/test/data/extensions/api_test/events_are_unregistered/page1.html
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A |
chrome/test/data/extensions/api_test/events_are_unregistered/page1.js
|
View
|
|
1 chunk |
+24 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
chrome/test/data/extensions/api_test/events_are_unregistered/page2.html
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A + |
chrome/test/data/extensions/api_test/events_are_unregistered/page2.js
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/dispatcher.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
extensions/renderer/event_bindings.h
|
View
|
1
2
3
4
5
|
4 chunks |
+27 lines, -6 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/event_bindings.cc
|
View
|
1
2
3
4
5
|
6 chunks |
+41 lines, -18 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/event_unittest.cc
|
View
|
|
2 chunks |
+0 lines, -36 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/module_system.h
|
View
|
1
2
3
4
5
6
|
3 chunks |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/module_system.cc
|
View
|
1
2
3
4
5
6
|
5 chunks |
+18 lines, -10 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/module_system_test.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
extensions/renderer/native_handler.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/native_handler.cc
|
View
|
1
6
|
1 chunk |
+9 lines, -2 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/object_backed_native_handler.h
|
View
|
1
2
3
4
5
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/object_backed_native_handler.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/resources/event.js
|
View
|
|
5 chunks |
+0 lines, -16 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/script_context.h
|
View
|
1
2
3
4
5
|
4 chunks |
+17 lines, -5 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/script_context.cc
|
View
|
1
|
3 chunks |
+25 lines, -7 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/script_context_set_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
extensions/renderer/v8_schema_registry.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
Total messages: 24 (3 generated)
|