Repository navigation
Fix building with --feature js_backtrace - #27042
Merged
Merged
Conversation
- mozjs::jsapi::CapturedJSStack::as_string() (https://doc.servo.org/mozjs/rust/struct.CapturedJSStack.html#method.as_string) was updated to accept a second parameter which specifies which Stacktrace format to use. The default has been specified to preserve the (presumably) original behavior. - The related code has also been placed in an unsafe block since the capture_stack macro calling the unsafe mozjs::jsapi::CapturedJSStack::new() function. Seems that this commit (servo@0703a1a) forgot this part.
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @asajeffrey (or someone else) soon. |
|
Heads up! This PR modifies the following files:
|
Member
|
Please file an issue about the crash! That's very interesting. |
Member
|
@bors-servo r+ |
Contributor
|
📌 Commit 6a5a77a has been approved by |
Contributor
Contributor
|
☀️ Test successful - status-taskcluster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an build error that I ran into when using the
--features js_backtraceflag.In particular, the error I ran into was this:
It seems that the
mozjscrate updated theas_string()method onCapturedJSStackto take two parameters. I've chosen to useStackFormat::Defaultbecause that will presumably preserve the original intended behavior.I additionally had to make the block wrapping the feature unsafe as I ran into a "must be marked as unsafe to call unsafe code" build error after fixing the above issue. Seems that this commit (0703a1a) forgot that part.
Other Notes
After these changes, I was able to build but ran into an access violation error during runtime. When a JS error hit
throw_dom_exception()and the JS stack was pulled, some sort of issue was hit inside mozjs andMOZ_NoReturn()was called, which will obviously cause an issue.It is worth noting that this only happened on my test platform (Hololens 2) and not on MacOS or in the Hololens 2 emulator. Additionally, the debug logs were not particularly helpful at identifying the culprit. Maybe it is worth making a full issue for?
Here's the full details:
Error message:
Stack Trace:
Repro:
C:\Python27\python.exe mach build -d --uwp --win-arm64 --features js_backtraceDefaultUrl.hto"http://yeticgi.casualos.com/?story=test1&pagePortal=home".DEVELOPERS.mdif you do.SavedStacks.cpp../mach build -ddoes not report any errors./mach test-tidydoes not report any errors