fune/devtools/shared/fronts/array-buffer.js
yulia ef38cc7174 Bug 1545021 - Convert ArrayBuffer to a Front and Protocoljs actor; r=ochameau,jdescottes
This introduces an ArrayBuffer front, so that we no longer need to go through the thread client to get an array buffer for the sourceFront (this is the only place it is used).

It also converts the arrayBufferActor to a protocol.js actor. I was running into an issue between them. I need to double check what this issue was. If these two refactors need to be split, I can do that, but for now it looks like it wasn’t that large of a change.

Differential Revision: https://phabricator.services.mozilla.com/D27878

--HG--
rename : devtools/shared/client/array-buffer-client.js => devtools/shared/fronts/array-buffer.js
extra : moz-landing-system : lando
2019-04-30 14:40:43 +00:00

21 lines
677 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { arrayBufferSpec } = require("devtools/shared/specs/array-buffer");
const { FrontClassWithSpec, registerFront } = require("devtools/shared/protocol");
/**
* A ArrayBufferClient provides a way to access ArrayBuffer from the
* debugger server.
*/
class ArrayBufferFront extends FrontClassWithSpec(arrayBufferSpec) {
form(json) {
this.length = json.length;
}
}
exports.ArrayBufferFront = ArrayBufferFront;
registerFront(ArrayBufferFront);