Closed Bug 639598 Opened 13 years ago Closed 13 years ago

Consider caching the return value of mozResponseArrayBuffer

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 658683

People

(Reporter: bzbarsky, Unassigned)

Details

It's a matter of time before someone writes silly code that gets this property over and over...

For .responseText we use a shareable string buffer, so once we compute it once every get is just an addref.

For .mozResponseArrayBuffer, could we cache the actual JSObject?  If not, could we cache the backing store?

Note that we have to be careful here because unlike strings typed arrays are _mutable_.  So if we did cache we'd need to somehow invalidate the cache on writes from JS too... or something.

Maybe this isn't very doable.
.mozResponseArrayBuffer has been changed to .response with .responseType="arraybuffer", and property value caching has been implemented in bug 658683.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.