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

Set user interactions for tasks #26029

Merged
merged 1 commit into from Mar 26, 2020
Merged

Set user interactions for tasks #26029

merged 1 commit into from Mar 26, 2020

Conversation

@paulrouget
Copy link
Contributor

paulrouget commented Mar 25, 2020

fix #26026

I need help here. Retrieving the interaction flag from the promise handle crashes.

let interaction = GetPromiseUserInputEventHandlingState(promise);
Stack trace for thread "ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }"
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/paul/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/libunwind.rs:86
      backtrace::backtrace::trace_unsynchronized
             at /Users/paul/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/mod.rs:66
   1: <servo::backtrace::Print as core::fmt::Debug>::fmt
             at ports/glutin/backtrace.rs:49
   2: <&mut W as core::fmt::Write>::write_fmt
   3: std::io::Write::write_fmt
             at /rustc/45ebd5808afd3df7ba842797c0fcd4447ddf30fb/src/libstd/io/mod.rs:1427
   4: servo::backtrace::print
             at ports/glutin/backtrace.rs:17
   5: servo::install_crash_handler::handler
             at ports/glutin/main2.rs:68
   6: <unknown>
   7: _ZN2JS37GetPromiseUserInputEventHandlingStateENS_6HandleIP8JSObjectEE
             at /Users/paul/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/2392ebc/mozjs/js/src/vm/JSObject.h:106
@highfive
Copy link

highfive commented Mar 25, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/script_runtime.rs, components/script/dom/promise.rs, components/script/microtask.rs, components/script/timers.rs
  • @KiChjang: components/script/script_runtime.rs, components/script/dom/promise.rs, components/script/microtask.rs, components/script/timers.rs
@highfive
Copy link

highfive commented Mar 25, 2020

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@jdm
Copy link
Member

jdm commented Mar 25, 2020

There's a null promise object being passed in enqueue_promise_job. I'm doing a debugmozjs build to try to figure out why.

@jdm jdm force-pushed the paulrouget:uitask branch from 712bfcb to 9e8c212 Mar 25, 2020
@jdm
Copy link
Member

jdm commented Mar 25, 2020

@paulrouget Judging by gecko and spidermonkey code, passing a null promise object is a valid state so I pushed a change that avoids the crash. I can successfully start immersive mode in the tennis demo on desktop now.

@jdm jdm force-pushed the paulrouget:uitask branch from 9e8c212 to a4a7a0d Mar 25, 2020
@paulrouget paulrouget force-pushed the paulrouget:uitask branch from a4a7a0d to 5621c88 Mar 26, 2020
@paulrouget paulrouget changed the title WIP: Set user interactions for tasks Set user interactions for tasks Mar 26, 2020
@paulrouget
Copy link
Contributor Author

paulrouget commented Mar 26, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2020

Trying commit 5621c88 with merge 98dbb86...

bors-servo added a commit that referenced this pull request Mar 26, 2020
Set user interactions for tasks

fix #26026

I need help here. Retrieving the interaction flag from the promise handle crashes.

```rust
let interaction = GetPromiseUserInputEventHandlingState(promise);
```

```
Stack trace for thread "ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }"
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/paul/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/libunwind.rs:86
      backtrace::backtrace::trace_unsynchronized
             at /Users/paul/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/mod.rs:66
   1: <servo::backtrace::Print as core::fmt::Debug>::fmt
             at ports/glutin/backtrace.rs:49
   2: <&mut W as core::fmt::Write>::write_fmt
   3: std::io::Write::write_fmt
             at /rustc/45ebd5808afd3df7ba842797c0fcd4447ddf30fb/src/libstd/io/mod.rs:1427
   4: servo::backtrace::print
             at ports/glutin/backtrace.rs:17
   5: servo::install_crash_handler::handler
             at ports/glutin/main2.rs:68
   6: <unknown>
   7: _ZN2JS37GetPromiseUserInputEventHandlingStateENS_6HandleIP8JSObjectEE
             at /Users/paul/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/2392ebc/mozjs/js/src/vm/JSObject.h:106
```
@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2020

☀️ Test successful - status-taskcluster
State: approved= try=True

@paulrouget
Copy link
Contributor Author

paulrouget commented Mar 26, 2020

@jdm r?

@jdm
Copy link
Member

jdm commented Mar 26, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2020

📌 Commit 5621c88 has been approved by jdm

@highfive highfive assigned jdm and unassigned SimonSapin Mar 26, 2020
@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2020

Testing commit 5621c88 with merge 0ed0c0d...

@bors-servo
Copy link
Contributor

bors-servo commented Mar 26, 2020

☀️ Test successful - status-taskcluster
Approved by: jdm
Pushing 0ed0c0d to master...

@bors-servo bors-servo merged commit 0ed0c0d into servo:master Mar 26, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.