mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 22:28:59 +02:00
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
24 lines
620 B
JavaScript
24 lines
620 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 protocol = require("devtools/shared/protocol");
|
|
const {Arg, RetVal, generateActorSpec} = protocol;
|
|
|
|
const arrayBufferSpec = generateActorSpec({
|
|
typeName: "arraybuffer",
|
|
|
|
methods: {
|
|
slice: {
|
|
request: {
|
|
start: Arg(0),
|
|
count: Arg(1),
|
|
},
|
|
response: RetVal("json"),
|
|
},
|
|
release: { release: true },
|
|
},
|
|
});
|
|
|
|
exports.arrayBufferSpec = arrayBufferSpec;
|