Dataclone error with indexedb

RESOLVED INVALID

Status

()

Core
JavaScript Engine
RESOLVED INVALID
5 years ago
5 years ago

People

(Reporter: daleharvey, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
I was told this should probably be filed against the JS engine.

I am writing a library that uses indexedDB, when users call my library they pass me javascript objects, I dont want to make changes to those objects so I copy them using any of the various extend() functions

If a user also happens to have included a library which modifies the Array or Object prototype then

[21:32:25.966] DataCloneError: The object could not be cloned.

is thrown, this also happens in chrome

If you open your console and visit http://jsbin.com/acuyor/6/edit it should reproduce
(Reporter)

Comment 1

5 years ago
Closing invalid, extend tries to copy the function added to the Array prototype which cant be cloned
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.