Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce unnecesarily large borrow in script thread #24742

Merged
merged 1 commit into from Nov 17, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

script: Reduce scope of borrows for history updates.

  • Loading branch information
jdm committed Nov 14, 2019
commit 8846cda501bd0523a07180b1ea5606a7b8299f1a
@@ -2538,7 +2538,8 @@ impl ScriptThread {
source_origin: ImmutableOrigin,
data: StructuredSerializedData,
) {
match { self.documents.borrow().find_window(pipeline_id) } {
let window = self.documents.borrow().find_window(pipeline_id);
match window {
None => return warn!("postMessage after target pipeline {} closed.", pipeline_id),
Some(window) => {
// FIXME: synchronously talks to constellation.
@@ -2621,7 +2622,8 @@ impl ScriptThread {
history_state_id: Option<HistoryStateId>,
url: ServoUrl,
) {
match { self.documents.borrow().find_window(pipeline_id) } {
let window = self.documents.borrow().find_window(pipeline_id);
match window {
None => {
return warn!(
"update history state after pipeline {} closed.",
@@ -2637,7 +2639,8 @@ impl ScriptThread {
pipeline_id: PipelineId,
history_states: Vec<HistoryStateId>,
) {
match { self.documents.borrow().find_window(pipeline_id) } {
let window = self.documents.borrow().find_window(pipeline_id);
match window {
None => {
return warn!(
"update history state after pipeline {} closed.",
@@ -7,7 +7,7 @@
expected: FAIL

[Opening a blob URL in a new window immediately before revoking it works.]
expected: FAIL
expected: TIMEOUT

[Opening a blob URL in a noopener about:blank window immediately before revoking it works.]
expected: FAIL

This file was deleted.

@@ -5,9 +5,9 @@
[[data-expected-height\] 7]
expected: FAIL

[[data-expected-height\] 1]
[[data-expected-height\] 3]
expected: FAIL

[[data-expected-height\] 2]
[[data-expected-height\] 4]
expected: FAIL

@@ -0,0 +1,2 @@
[white-space-002.xht]
expected: FAIL
@@ -0,0 +1,2 @@
[white-space-003.xht]
expected: FAIL
@@ -0,0 +1,2 @@
[line-height-204.html]
expected: FAIL
@@ -0,0 +1,2 @@
[mix-blend-mode-paragraph.html]
expected: FAIL
@@ -0,0 +1,2 @@
[background-repeat-round-roundup.xht]
expected: FAIL
@@ -0,0 +1,2 @@
[word-break-break-all-007.html]
expected: FAIL
@@ -0,0 +1,2 @@
[word-break-keep-all-006.html]
expected: FAIL
@@ -1,4 +1,5 @@
[perspective-interpolation.html]
expected: ERROR
[ perspective interpolation]
expected: FAIL

@@ -0,0 +1,2 @@
[css-transforms-3d-on-anonymous-block-001.html]
expected: FAIL
@@ -0,0 +1,4 @@
[elementsFromPoint-invalid-cases.html]
[The root element is the last element returned for otherwise empty queries within the viewport]
expected: FAIL

@@ -312,18 +312,9 @@
[<iframe>: separate response Content-Type: */* text/html]
expected: FAIL

[<iframe>: separate response Content-Type: text/html;" text/plain]
[<iframe>: combined response Content-Type: */* text/html]
expected: FAIL

[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL

[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL

[<iframe>: separate response Content-Type: text/html */*]
expected: FAIL

[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL

@@ -53,6 +53,6 @@
[combined text/javascript ]
expected: FAIL

[separate text/javascript;charset=windows-1252 error text/javascript]
[separate text/javascript x/x]
expected: FAIL

@@ -11,6 +11,6 @@
[X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL

[X-Content-Type-Options%3A%20no%0D%0AX-Content-Type-Options%3A%20nosniff]
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
expected: FAIL

@@ -5,7 +5,7 @@
expected: FAIL

[Embedded credentials are treated as network errors in frames.]
expected: FAIL
expected: TIMEOUT

[Embedded credentials are treated as network errors in new windows.]
expected: FAIL

This file was deleted.

@@ -1,4 +1,4 @@
[traverse_the_history_3.html]
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

@@ -18,6 +18,3 @@
[Set HTTP URL frame location.protocol to x]
expected: FAIL

[Set data URL frame location.protocol to data]
expected: FAIL

@@ -1,7 +1,7 @@
[document_domain_access_details.sub.html]
expected: TIMEOUT
[Access allowed if same-origin with no 'document.domain' modification. (Sanity check)]
expected: FAIL
expected: TIMEOUT

[Access is revoked to Window object when we stop being same effective script origin due to document.domain.]
expected: NOTRUN
@@ -13,7 +13,7 @@
expected: NOTRUN

[Access not allowed if different-origin with no 'document.domain' modification. (Sanity check)]
expected: TIMEOUT
expected: NOTRUN

[Access disallowed again if same-origin, both set document-domain to existing value, then one sets to parent.]
expected: NOTRUN
@@ -0,0 +1,4 @@
[creating_browsing_context_test_01.html]
[first argument: absolute url]
expected: FAIL

@@ -1,48 +1,32 @@
[open-features-non-integer-width.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `width`]
expected: FAIL

[features "width=405^4" should set "width=405"]
expected: TIMEOUT
expected: FAIL

[features "width=405.5" should set "width=405"]
expected: TIMEOUT
expected: FAIL

[features "width=405e1" should set "width=405"]
expected: TIMEOUT
expected: FAIL

[features "width=405 " should set "width=405"]
expected: TIMEOUT
expected: FAIL

[features "width=405.32" should set "width=405"]
expected: TIMEOUT
expected: FAIL

[features "width=405LLl" should set "width=405"]
expected: TIMEOUT
expected: FAIL

[features "width=405*3" should set "width=405"]
expected: TIMEOUT
expected: FAIL

[features "width=405e-1" should set "width=405"]
expected: TIMEOUT
expected: FAIL

[features "width=405/5" should set "width=405"]
expected: TIMEOUT

[top=0,left=0: absence of feature "width" should be treated same as "width=0"]
expected: TIMEOUT

[features "width=_404" should NOT set "width=404"]
expected: TIMEOUT

[top=0,left=0,height=401,: absence of feature "width" should be treated same as "width=0"]
expected: TIMEOUT

[features "width=/404" should NOT set "width=404"]
expected: TIMEOUT

[features "width=L404" should NOT set "width=404"]
expected: TIMEOUT
expected: FAIL

@@ -1,4 +1,5 @@
[embedded-opener-remove-frame.html]
expected: CRASH
[opener and "removed" embedded documents]
expected: FAIL

@@ -1,5 +1,6 @@
[iframe_sandbox_popups_escaping-1.html]
type: testharness
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: FAIL
expected: TIMEOUT

@@ -1,5 +1,6 @@
[iframe_sandbox_popups_nonescaping-3.html]
type: testharness
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: FAIL
expected: NOTRUN

This file was deleted.

@@ -1,4 +1,5 @@
[form-submission-algorithm.html]
expected: TIMEOUT
[If form's firing submission events is true, then return; 'submit' event]
expected: FAIL
@@ -17,3 +18,6 @@
[firing an event named submit; form.requestSubmit()]
expected: FAIL

[Cannot navigate (after constructing the entry list)]
expected: TIMEOUT

This file was deleted.

@@ -5,14 +5,14 @@
expected: NOTRUN

[Check that rel=noopener with target=_parent does a normal load]
expected: NOTRUN
expected: FAIL

[Check that rel=noopener with target=_top does a normal load]
expected: NOTRUN
expected: FAIL

[Check that targeting of rel=noopener with a given name reuses an existing window with that name]
expected: NOTRUN

[Check that rel=noopener with target=_self does a normal load]
expected: NOTRUN
expected: FAIL

@@ -1,5 +1,4 @@
[promise-rejection-events.html]
expected: TIMEOUT
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
expected: FAIL

@@ -9,6 +8,3 @@
[no unhandledrejection/rejectionhandled: rejection handler attached synchronously to a promise created from createImageBitmap]
expected: FAIL

[rejectionhandled is dispatched from a queued task, and not immediately]
expected: TIMEOUT

@@ -12,3 +12,6 @@
[Verifies the resolution of entry.startTime is at least 5 microseconds.]
expected: TIMEOUT

[Verifies the resolution of performance.now() is at least 5 microseconds.]
expected: FAIL

@@ -1,2 +1,13 @@
[cross-http.keep-origin.http.html]
expected: CRASH
[`Referer` header with length < 4k is not stripped to an origin.]
expected: FAIL

[`Referer` header with length > 4k is stripped to an origin.]
expected: FAIL

[`Referer` header with length == 4k is not stripped to an origin.]
expected: FAIL

[Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and keep-origin redirection from http context.]
expected: FAIL

@@ -1,2 +1,13 @@
[cross-http.no-redirect.http.html]
expected: CRASH
[`Referer` header with length < 4k is not stripped to an origin.]
expected: FAIL

[`Referer` header with length > 4k is stripped to an origin.]
expected: FAIL

[`Referer` header with length == 4k is not stripped to an origin.]
expected: FAIL

[Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and no-redirect redirection from http context.]
expected: FAIL

@@ -1,2 +1,13 @@
[cross-http.swap-origin.http.html]
expected: CRASH
[`Referer` header with length < 4k is not stripped to an origin.]
expected: FAIL

[Referrer Policy: Expects stripped-referrer for iframe-tag to cross-http origin and swap-origin redirection from http context.]
expected: FAIL

[`Referer` header with length > 4k is stripped to an origin.]
expected: FAIL

[`Referer` header with length == 4k is not stripped to an origin.]
expected: FAIL

@@ -1,2 +1,13 @@
[cross-https.keep-origin.http.html]
expected: CRASH
[`Referer` header with length < 4k is not stripped to an origin.]
expected: FAIL

[`Referer` header with length > 4k is stripped to an origin.]
expected: FAIL

[Referrer Policy: Expects stripped-referrer for iframe-tag to cross-https origin and keep-origin redirection from http context.]
expected: FAIL

[`Referer` header with length == 4k is not stripped to an origin.]
expected: FAIL

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.