Closed Bug 1340589 Opened 7 years ago Closed 7 years ago

js::Disassemble1 ignores script->mainOffset() while checking JSTRY_CATCH start

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: arai, Assigned: arai)

Details

Attachments

(1 file)

code:
  disfile("a.js")

a.js:
  var x, y;
  try {} catch (e) {}

actual result:
  there's no catch offset next to "try" opcode

expected result:
  "try" opcode has catch offset

patch is coming.
mainOffset can be non-zero for top level code, so note.start is based on mainOffset.
so Disassemble1 should use mainOffset value while comparing note.start against PC offset.
Attachment #8838601 - Flags: review?(luke)
Comment on attachment 8838601 [details] [diff] [review]
Use Jsscript::mainOffset() while checking JSTRY_CATCH in dis() output.

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

Whoa, tricky.
Attachment #8838601 - Flags: review?(luke) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e319d3fd614a71056cce9deb07a530abe825bfba
Bug 1340589 - Use JSScript::mainOffset() while checking JSTRY_CATCH in dis() output. r=luke
https://hg.mozilla.org/mozilla-central/rev/e319d3fd614a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: