From 9d2af3f6369b6a3396936f3c44e9ffc0caebb74b Mon Sep 17 00:00:00 2001 From: Masatoshi Kimura Date: Wed, 10 Jun 2020 22:51:22 +0000 Subject: [PATCH] Bug 1482279 - Update the comment in dom/quota/test/common/content.js. r=asuth Since content has no access to chrome-privileged objects without permissive COWs, we can no longer unwrap the methods anymore. On the other hand, SpecialPowers wrapper improved so that we don't have to unwrap the return value from getAsArrayBuffer() manually. Differential Revision: https://phabricator.services.mozilla.com/D79140 --- dom/quota/test/common/content.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dom/quota/test/common/content.js b/dom/quota/test/common/content.js index be7170106bcd..229a272aa2bd 100644 --- a/dom/quota/test/common/content.js +++ b/dom/quota/test/common/content.js @@ -29,10 +29,11 @@ function clearAllDatabases(callback) { // // Our use of (wrapped) SpecialPowers.Cc results in getSimpleDatabase() // producing a wrapped nsISDBConnection instance. The nsISDBResult instances -// exposed on the (wrapped) nsISDBRequest are also wrapped, so our -// requestFinished helper wraps the results in helper objects that behave the -// same as the result, automatically unwrapping the wrapped array/arraybuffer -// results. +// exposed on the (wrapped) nsISDBRequest are also wrapped. +// In particular, the wrapper takes responsibility for automatically cloning +// the ArrayBuffer returned by nsISDBResult.getAsArrayBuffer into the content +// compartment (rather than wrapping it) so that constructing a Uint8Array +// from it will succeed. function getSimpleDatabase() { let connection = SpecialPowers.Cc[