Remove the case BinTokenReaderBase.errorReporter_ is null

RESOLVED FIXED in mozilla65

Status

()

enhancement
P3
normal
RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: arai, Assigned: arai)

Tracking

(Blocks 1 bug)

Trunk
mozilla65
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 disabled)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 months ago
https://searchfox.org/mozilla-central/rev/e0c879c86b95bdc752b1dbff6088169735674e4a/js/src/frontend/BinTokenReaderBase.cpp#37
> ErrorResult<JS::Error&>
> BinTokenReaderBase::raiseError(const char* description)
> {
>     MOZ_ASSERT(!cx_->isExceptionPending());
>     if (MOZ_LIKELY(errorReporter_)) {
>         errorReporter_->reportErrorNoOffset(JSMSG_BINAST, description);
>     } else {
>         // Only true in testing code.
> ...

This should be removed in order to introduce better error reporting methods.
(Assignee)

Updated

6 months ago
Blocks: 1500836
(Assignee)

Updated

6 months ago
Blocks: 1502792
(Assignee)

Updated

6 months ago
No longer blocks: 1500836
(Assignee)

Comment 1

6 months ago
Removed the `!errorReporter_` case, and added dummy ErrorReporter to the test.
Currently the testcase doesn't test error case, so the dummy reporter crashes if error reporting methods are called.
Attachment #9023158 - Flags: review?(dteller)
Comment on attachment 9023158 [details] [diff] [review]
Remove the case BinTokenReaderBase.errorReporter_ is null

Review of attachment 9023158 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsapi-tests/testBinTokenReaderTester.cpp
@@ +36,5 @@
>  #if defined(XP_UNIX)
>  
>  #include <sys/param.h>
>  
> +class DummyErrorReporter : public js::frontend::ErrorReporter

Could you document what this dummy error reporter is for?

Also, shouldn't this be out of the `#if defined(XP_UNIX)`?
Attachment #9023158 - Flags: review?(dteller) → review+
(Assignee)

Updated

6 months ago
Depends on: 1503142
(Assignee)

Comment 3

5 months ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/9b456742a2cc22f56aac2a4d26063307b85135a6
Bug 1502280 - Remove the case BinTokenReaderBase.errorReporter_ is null. r=Yoric

Comment 5

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/9b456742a2cc
https://hg.mozilla.org/mozilla-central/rev/d3f4d556a89d
Status: ASSIGNED → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.