Closed Bug 1623484 Opened 4 years ago Closed 4 years ago

Runtime.evaluate and Runtime.callFunctionOn return wrong data for Symbol and BigInt types

Categories

(Remote Protocol :: CDP, defect, P1)

defect

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [puppeteer-beta-mvp])

Attachments

(1 file)

While implementing bug 1607560 I noticed that for both the Symbol and BigInt wrong data is returned.

Chrome:

>>> var result = Runtime.evaluate({ expression: "42n"});
>>> result
Promise {
  {
    result: { type: 'bigint', unserializableValue: '42n', description: '42n' }
  },
  inspect: [AsyncFunction]
}
>>> var result = Runtime.evaluate({ expression: "42n", returnByValue: false});
>>> result
Promise {
  {
    result: { type: 'bigint', unserializableValue: '42n', description: '42n' }
  },
  inspect: [AsyncFunction]
}

Firefox:

>>> var result = Runtime.evaluate({ expression: "42n"});
>>> result
Promise {
  {
    result: {
      objectId: 'c8843032-e079-7342-83ee-2814d2f17970',
      type: 'bigint'
    }
  },
  inspect: [AsyncFunction]
}
>>> var result = Runtime.evaluate({ expression: "42n", returnByValue: false});
>>> result
Promise {
  {
    result: {
      objectId: '2ff2b537-d5de-414e-b783-7290981217ca',
      type: 'bigint'
    }
  },
  inspect: [AsyncFunction]
}

It would be great to see that fixed, which would simplify the changes on bug 1607560.

This actually also affects Runtime.callFunctionOn.

Blocks: 1549495, 1549488
Summary: Runtime.evaluate returns wrong data for Symbol and BigInt types → Runtime.evaluate and Runtime.callFunctionOn return wrong data for Symbol and BigInt types
Depends on: 1623581
Whiteboard: [puppeteer-beta-reserve] → [puppeteer-beta-mvp]
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9f72cf155767
[remote] Runtime.evaluate and Runtime.callFunctionOn return wrong data for Symbol and BigInt types. r=remote-protocol-reviewers,maja_zf
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
Component: CDP: Runtime → CDP
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: