Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix building with --feature js_backtrace #27042
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 (0703a1a) forgot this part.
highfive
commented
Jun 22, 2020
|
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. |
highfive
commented
Jun 22, 2020
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jun 22, 2020
|
Please file an issue about the crash! That's very interesting. |
|
@bors-servo r+ |
|
|
|
|
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.
KallynGowdy commentedJun 22, 2020
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