зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to fx-team a=merge
This commit is contained in:
Коммит
0e306cd88c
|
@ -19,13 +19,13 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2944695a89c3281d49dbe5ff9c0cd26c8318e2ba"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="57da30f405ba37a5d4844f32bb292271b81faee2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="bbb7659d8ea2afb396f99b3dc971ab3c42da3778"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="3326b51017252e09ccdd715dec6c5e12a7d1ecfe"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="aa5ba9351d37d4f9055c696edfaaee8db559f851"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b5e21ed930860a0d43728b556b09e8dedd27fdeb"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2944695a89c3281d49dbe5ff9c0cd26c8318e2ba"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="57da30f405ba37a5d4844f32bb292271b81faee2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="bbb7659d8ea2afb396f99b3dc971ab3c42da3778"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="aa5ba9351d37d4f9055c696edfaaee8db559f851"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b5e21ed930860a0d43728b556b09e8dedd27fdeb"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2944695a89c3281d49dbe5ff9c0cd26c8318e2ba"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="57da30f405ba37a5d4844f32bb292271b81faee2"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="bbb7659d8ea2afb396f99b3dc971ab3c42da3778"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="aa5ba9351d37d4f9055c696edfaaee8db559f851"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b5e21ed930860a0d43728b556b09e8dedd27fdeb"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2944695a89c3281d49dbe5ff9c0cd26c8318e2ba"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="57da30f405ba37a5d4844f32bb292271b81faee2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="bbb7659d8ea2afb396f99b3dc971ab3c42da3778"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="3326b51017252e09ccdd715dec6c5e12a7d1ecfe"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="aa5ba9351d37d4f9055c696edfaaee8db559f851"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b5e21ed930860a0d43728b556b09e8dedd27fdeb"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2944695a89c3281d49dbe5ff9c0cd26c8318e2ba"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="57da30f405ba37a5d4844f32bb292271b81faee2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="bbb7659d8ea2afb396f99b3dc971ab3c42da3778"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="aa5ba9351d37d4f9055c696edfaaee8db559f851"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b5e21ed930860a0d43728b556b09e8dedd27fdeb"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "2ae85acdbb87a0bd64144196d44ca0acd134b38c",
|
||||
"revision": "4073b397d7b5d37ae81ced569e4af7c734defe68",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2944695a89c3281d49dbe5ff9c0cd26c8318e2ba"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="57da30f405ba37a5d4844f32bb292271b81faee2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="bbb7659d8ea2afb396f99b3dc971ab3c42da3778"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="aa5ba9351d37d4f9055c696edfaaee8db559f851"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b5e21ed930860a0d43728b556b09e8dedd27fdeb"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2944695a89c3281d49dbe5ff9c0cd26c8318e2ba"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="57da30f405ba37a5d4844f32bb292271b81faee2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="bbb7659d8ea2afb396f99b3dc971ab3c42da3778"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2944695a89c3281d49dbe5ff9c0cd26c8318e2ba"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="57da30f405ba37a5d4844f32bb292271b81faee2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="bbb7659d8ea2afb396f99b3dc971ab3c42da3778"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="aa5ba9351d37d4f9055c696edfaaee8db559f851"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b5e21ed930860a0d43728b556b09e8dedd27fdeb"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2944695a89c3281d49dbe5ff9c0cd26c8318e2ba"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="57da30f405ba37a5d4844f32bb292271b81faee2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="bbb7659d8ea2afb396f99b3dc971ab3c42da3778"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="aa5ba9351d37d4f9055c696edfaaee8db559f851"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b5e21ed930860a0d43728b556b09e8dedd27fdeb"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
|
|
|
@ -84,6 +84,22 @@ function getDOMWindow(aChannel) {
|
|||
return win;
|
||||
}
|
||||
|
||||
function makeContentReadable(obj, window) {
|
||||
if (Cu.cloneInto) {
|
||||
return Cu.cloneInto(obj, window);
|
||||
}
|
||||
// TODO remove for Firefox 32+
|
||||
if (typeof obj !== 'object' || obj === null) {
|
||||
return obj;
|
||||
}
|
||||
var expose = {};
|
||||
for (let k in obj) {
|
||||
expose[k] = "rw";
|
||||
}
|
||||
obj.__exposedProps__ = expose;
|
||||
return obj;
|
||||
}
|
||||
|
||||
function parseQueryString(qs) {
|
||||
if (!qs)
|
||||
return {};
|
||||
|
@ -537,7 +553,6 @@ RequestListener.prototype.receive = function(event) {
|
|||
if (sync) {
|
||||
var response = actions[action].call(this.actions, data);
|
||||
var detail = event.detail;
|
||||
detail.__exposedProps__ = {response: 'r'};
|
||||
detail.response = response;
|
||||
} else {
|
||||
var response;
|
||||
|
@ -548,9 +563,10 @@ RequestListener.prototype.receive = function(event) {
|
|||
try {
|
||||
var listener = doc.createEvent('CustomEvent');
|
||||
listener.initCustomEvent('shumway.response', true, false,
|
||||
{response: response,
|
||||
cookie: cookie,
|
||||
__exposedProps__: {response: 'r', cookie: 'r'}});
|
||||
makeContentReadable({
|
||||
response: response,
|
||||
cookie: cookie
|
||||
}, doc.defaultView));
|
||||
|
||||
return message.dispatchEvent(listener);
|
||||
} catch (e) {
|
||||
|
@ -752,11 +768,11 @@ function initExternalCom(wrappedWindow, wrappedObject, targetDocument) {
|
|||
var args = Array.prototype.slice.call(arguments, 0);
|
||||
wrappedWindow.console.log('__flash__callIn: ' + functionName);
|
||||
var e = targetDocument.createEvent('CustomEvent');
|
||||
e.initCustomEvent('shumway.remote', true, false, {
|
||||
e.initCustomEvent('shumway.remote', true, false, makeContentReadable({
|
||||
functionName: functionName,
|
||||
args: args,
|
||||
__exposedProps__: {args: 'r', functionName: 'r', result: 'rw'}
|
||||
});
|
||||
result: undefined
|
||||
}, targetDocument.defaultView));
|
||||
targetDocument.dispatchEvent(e);
|
||||
return e.detail.result;
|
||||
};
|
||||
|
|
|
@ -72,9 +72,6 @@ leak:AllocateArrayBufferContents
|
|||
# Bug 1022010 - Small leak under _render_glyph_outline. bc1
|
||||
leak:_render_glyph_outline
|
||||
|
||||
# Bug 1022042 - compareVariants in the test plugin leaks identifiers. oth
|
||||
leak:compareVariants(_NPP*,
|
||||
|
||||
# Bug 1022954 - ScriptSource leaks sourceMapURL_ sometimes. dt
|
||||
leak:ScriptSource::setSourceMapURL
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ GCONF_VERSION=1.2.1
|
|||
GIO_VERSION=2.20
|
||||
STARTUP_NOTIFICATION_VERSION=0.8
|
||||
DBUS_VERSION=0.60
|
||||
SQLITE_VERSION=3.8.4.2
|
||||
SQLITE_VERSION=3.8.5
|
||||
|
||||
MSMANIFEST_TOOL=
|
||||
|
||||
|
|
|
@ -2172,22 +2172,6 @@ WebGLContext::ReadPixels(GLint x, GLint y, GLsizei width,
|
|||
return ErrorInvalidOperation("readPixels: Invalid type floatness");
|
||||
|
||||
// Check the format and type params to assure they are an acceptable pair (as per spec)
|
||||
switch (format) {
|
||||
case LOCAL_GL_RGBA: {
|
||||
switch (type) {
|
||||
case LOCAL_GL_UNSIGNED_BYTE:
|
||||
break;
|
||||
case LOCAL_GL_FLOAT:
|
||||
break;
|
||||
default:
|
||||
return ErrorInvalidOperation("readPixels: Invalid format/type pair");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return ErrorInvalidOperation("readPixels: Invalid format/type pair");
|
||||
}
|
||||
|
||||
MakeContextCurrent();
|
||||
|
||||
if (mBoundFramebuffer) {
|
||||
|
@ -2203,6 +2187,41 @@ WebGLContext::ReadPixels(GLint x, GLint y, GLsizei width,
|
|||
} else {
|
||||
ClearBackbufferIfNeeded();
|
||||
}
|
||||
|
||||
bool isFormatAndTypeValid = false;
|
||||
|
||||
// OpenGL ES 2.0 $4.3.1 - IMPLEMENTATION_COLOR_READ_{TYPE/FORMAT} is a valid
|
||||
// combination for glReadPixels().
|
||||
if (gl->IsSupported(gl::GLFeature::ES2_compatibility)) {
|
||||
GLenum implType = 0;
|
||||
GLenum implFormat = 0;
|
||||
|
||||
gl->fGetIntegerv(LOCAL_GL_IMPLEMENTATION_COLOR_READ_TYPE,
|
||||
reinterpret_cast<GLint*>(&implType));
|
||||
gl->fGetIntegerv(LOCAL_GL_IMPLEMENTATION_COLOR_READ_FORMAT,
|
||||
reinterpret_cast<GLint*>(&implFormat));
|
||||
|
||||
if (type == implType && format == implFormat) {
|
||||
isFormatAndTypeValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
switch (format) {
|
||||
case LOCAL_GL_RGBA: {
|
||||
switch (type) {
|
||||
case LOCAL_GL_UNSIGNED_BYTE:
|
||||
case LOCAL_GL_FLOAT:
|
||||
isFormatAndTypeValid = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isFormatAndTypeValid) {
|
||||
return ErrorInvalidOperation("readPixels: Invalid format/type pair");
|
||||
}
|
||||
|
||||
// Now that the errors are out of the way, on to actually reading
|
||||
|
||||
// If we won't be reading any pixels anyways, just skip the actual reading
|
||||
|
|
|
@ -222,6 +222,24 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv)
|
|||
gl->fGetIntegerv(pname, &i);
|
||||
return JS::NumberValue(uint32_t(i));
|
||||
}
|
||||
case LOCAL_GL_IMPLEMENTATION_COLOR_READ_TYPE: {
|
||||
GLint i = 0;
|
||||
if (gl->IsSupported(gl::GLFeature::ES2_compatibility)) {
|
||||
gl->fGetIntegerv(pname, &i);
|
||||
} else {
|
||||
i = LOCAL_GL_UNSIGNED_BYTE;
|
||||
}
|
||||
return JS::NumberValue(uint32_t(i));
|
||||
}
|
||||
case LOCAL_GL_IMPLEMENTATION_COLOR_READ_FORMAT: {
|
||||
GLint i = 0;
|
||||
if (gl->IsSupported(gl::GLFeature::ES2_compatibility)) {
|
||||
gl->fGetIntegerv(pname, &i);
|
||||
} else {
|
||||
i = LOCAL_GL_RGBA;
|
||||
}
|
||||
return JS::NumberValue(uint32_t(i));
|
||||
}
|
||||
// int
|
||||
case LOCAL_GL_STENCIL_CLEAR_VALUE:
|
||||
case LOCAL_GL_STENCIL_REF:
|
||||
|
|
|
@ -74,9 +74,9 @@ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilFuncSeparate(gl.FRONT, gl.ALWA
|
|||
shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
|
||||
|
||||
debug("");
|
||||
debug("Verify that IMPLEMENTATION_COLOR_READ_FORMAT and IMPLEMENTATION_COLOR_READ_TYPE are undefined");
|
||||
shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_FORMAT);
|
||||
shouldBeUndefined(gl.IMPLEMENTATION_COLOR_READ_TYPE);
|
||||
debug("Verify that IMPLEMENTATION_COLOR_READ_FORMAT and IMPLEMENTATION_COLOR_READ_TYPE are defined");
|
||||
shouldBe(gl.IMPLEMENTATION_COLOR_READ_FORMAT, 0x8B9B);
|
||||
shouldBe(gl.IMPLEMENTATION_COLOR_READ_TYPE, 0x8B9A);
|
||||
|
||||
debug("");
|
||||
debug("Verify that *LENGTH are undefined");
|
||||
|
|
|
@ -23,7 +23,6 @@ public:
|
|||
// This class holds a weak pointer to MediaResource. It's the responsibility
|
||||
// of the caller to manage the memory of the MediaResource object.
|
||||
explicit BufferDecoder(MediaResource* aResource);
|
||||
virtual ~BufferDecoder();
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
|
@ -75,6 +74,8 @@ public:
|
|||
virtual void NotifyWaitingForResourcesStatusChanged() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~BufferDecoder();
|
||||
|
||||
// This monitor object is not really used to synchronize access to anything.
|
||||
// It's just there in order for us to be able to override
|
||||
// GetReentrantMonitor correctly.
|
||||
|
|
|
@ -420,6 +420,10 @@ DOMAudioNodeMediaStream::DOMAudioNodeMediaStream(AudioNode* aNode)
|
|||
{
|
||||
}
|
||||
|
||||
DOMAudioNodeMediaStream::~DOMAudioNodeMediaStream()
|
||||
{
|
||||
}
|
||||
|
||||
already_AddRefed<DOMAudioNodeMediaStream>
|
||||
DOMAudioNodeMediaStream::CreateTrackUnionStream(nsIDOMWindow* aWindow,
|
||||
AudioNode* aNode,
|
||||
|
|
|
@ -56,7 +56,6 @@ public:
|
|||
typedef uint8_t TrackTypeHints;
|
||||
|
||||
DOMMediaStream();
|
||||
virtual ~DOMMediaStream();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMMediaStream)
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
@ -209,6 +208,8 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
virtual ~DOMMediaStream();
|
||||
|
||||
void Destroy();
|
||||
void InitSourceStream(nsIDOMWindow* aWindow, TrackTypeHints aHintContents);
|
||||
void InitTrackUnionStream(nsIDOMWindow* aWindow, TrackTypeHints aHintContents);
|
||||
|
@ -286,6 +287,7 @@ class DOMAudioNodeMediaStream : public DOMMediaStream
|
|||
typedef dom::AudioNode AudioNode;
|
||||
public:
|
||||
DOMAudioNodeMediaStream(AudioNode* aNode);
|
||||
~DOMAudioNodeMediaStream();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DOMAudioNodeMediaStream, DOMMediaStream)
|
||||
|
|
|
@ -61,13 +61,14 @@ PRLogModuleInfo* gMediaDecoderLog;
|
|||
|
||||
class MediaMemoryTracker : public nsIMemoryReporter
|
||||
{
|
||||
virtual ~MediaMemoryTracker();
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIMEMORYREPORTER
|
||||
|
||||
MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf);
|
||||
|
||||
MediaMemoryTracker();
|
||||
virtual ~MediaMemoryTracker();
|
||||
void InitMemoryReporter();
|
||||
|
||||
static StaticRefPtr<MediaMemoryTracker> sUniqueInstance;
|
||||
|
|
|
@ -275,7 +275,6 @@ public:
|
|||
};
|
||||
|
||||
MediaDecoder();
|
||||
virtual ~MediaDecoder();
|
||||
|
||||
// Reset the decoder and notify the media element that
|
||||
// server connection is closed.
|
||||
|
@ -999,6 +998,8 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
virtual ~MediaDecoder();
|
||||
|
||||
/******
|
||||
* The following members should be accessed with the decoder lock held.
|
||||
******/
|
||||
|
|
|
@ -3267,6 +3267,8 @@ public:
|
|||
return mStateMachine->TimeoutExpired(mTimerId);
|
||||
}
|
||||
private:
|
||||
~TimerEvent() {}
|
||||
|
||||
const nsRefPtr<MediaDecoderStateMachine> mStateMachine;
|
||||
int mTimerId;
|
||||
};
|
||||
|
|
|
@ -238,13 +238,6 @@ public:
|
|||
mLastBlobTimeStamp = TimeStamp::Now();
|
||||
}
|
||||
|
||||
// Only DestroyRunnable is allowed to delete Session object.
|
||||
virtual ~Session()
|
||||
{
|
||||
LOG(PR_LOG_DEBUG, ("Session.~Session (%p)", this));
|
||||
CleanupStreams();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
LOG(PR_LOG_DEBUG, ("Session.Start %p", this));
|
||||
|
@ -299,7 +292,12 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
|
||||
// Only DestroyRunnable is allowed to delete Session object.
|
||||
virtual ~Session()
|
||||
{
|
||||
LOG(PR_LOG_DEBUG, ("Session.~Session (%p)", this));
|
||||
CleanupStreams();
|
||||
}
|
||||
// Pull encoded media data from MediaEncoder and put into EncodedBufferCache.
|
||||
// Destroy this session object in the end of this function.
|
||||
// If the bool aForceFlush is true, we will force to dispatch a
|
||||
|
|
|
@ -608,9 +608,9 @@ public:
|
|||
public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink
|
||||
{
|
||||
~Listener() {}
|
||||
public:
|
||||
Listener(ChannelMediaResource* aResource) : mResource(aResource) {}
|
||||
~Listener() {}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
|
|
|
@ -1591,6 +1591,7 @@ public:
|
|||
|
||||
class MediaStreamGraphShutdownObserver MOZ_FINAL : public nsIObserver
|
||||
{
|
||||
~MediaStreamGraphShutdownObserver() {}
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
|
|
@ -204,9 +204,9 @@ public:
|
|||
class Listener MOZ_FINAL : public nsIInterfaceRequestor,
|
||||
public nsIStreamingProtocolListener
|
||||
{
|
||||
~Listener() {}
|
||||
public:
|
||||
Listener(RtspMediaResource* aResource) : mResource(aResource) {}
|
||||
~Listener() {}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
|
|
|
@ -38,6 +38,9 @@ TextTrackCueList::TextTrackCueList(nsISupports* aParent) : mParent(aParent)
|
|||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
TextTrackCueList::~TextTrackCueList()
|
||||
{}
|
||||
|
||||
JSObject*
|
||||
TextTrackCueList::WrapObject(JSContext* aCx)
|
||||
{
|
||||
|
|
|
@ -55,6 +55,8 @@ public:
|
|||
void GetArray(nsTArray<nsRefPtr<TextTrackCue> >& aCues);
|
||||
|
||||
private:
|
||||
~TextTrackCueList();
|
||||
|
||||
nsCOMPtr<nsISupports> mParent;
|
||||
|
||||
// A sorted list of TextTrackCues sorted by earliest start time. If the start
|
||||
|
|
|
@ -35,6 +35,10 @@ TextTrackList::TextTrackList(nsPIDOMWindow* aOwnerWindow,
|
|||
{
|
||||
}
|
||||
|
||||
TextTrackList::~TextTrackList()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TextTrackList::UpdateAndGetShowingCues(nsTArray<nsRefPtr<TextTrackCue> >& aCues)
|
||||
{
|
||||
|
|
|
@ -28,6 +28,7 @@ public:
|
|||
|
||||
TextTrackList(nsPIDOMWindow* aOwnerWindow);
|
||||
TextTrackList(nsPIDOMWindow* aOwnerWindow, TextTrackManager* aTextTrackManager);
|
||||
~TextTrackList();
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
||||
|
|
|
@ -148,6 +148,8 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
~TextTrackRegion() {}
|
||||
|
||||
nsCOMPtr<nsISupports> mParent;
|
||||
double mWidth;
|
||||
long mLines;
|
||||
|
|
|
@ -50,6 +50,8 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
~VideoPlaybackQuality() {}
|
||||
|
||||
nsRefPtr<HTMLMediaElement> mElement;
|
||||
DOMHighResTimeStamp mCreationTime;
|
||||
uint64_t mTotalFrames;
|
||||
|
|
|
@ -37,7 +37,6 @@ class WebVTTListener MOZ_FINAL : public nsIWebVTTListener,
|
|||
|
||||
public:
|
||||
WebVTTListener(HTMLTrackElement* aElement);
|
||||
~WebVTTListener();
|
||||
|
||||
/**
|
||||
* Loads the WebVTTListener. Must call this in order for the listener to be
|
||||
|
@ -46,6 +45,8 @@ public:
|
|||
nsresult LoadResource();
|
||||
|
||||
private:
|
||||
~WebVTTListener();
|
||||
|
||||
// List of error codes returned from the WebVTT parser that we care about.
|
||||
enum ErrorCodes {
|
||||
BadSignature = 0
|
||||
|
|
|
@ -36,14 +36,14 @@ typedef uint32_t PromiseId;
|
|||
class MediaKeys MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache
|
||||
{
|
||||
~MediaKeys();
|
||||
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MediaKeys)
|
||||
|
||||
MediaKeys(nsPIDOMWindow* aParentWindow, const nsAString& aKeySystem);
|
||||
|
||||
~MediaKeys();
|
||||
|
||||
nsPIDOMWindow* GetParentObject() const;
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
|
|
@ -109,6 +109,8 @@ public:
|
|||
void UnregisterPannerNode(PannerNode* aPannerNode);
|
||||
|
||||
private:
|
||||
~AudioListener() {}
|
||||
|
||||
void SendDoubleParameterToStream(uint32_t aIndex, double aValue);
|
||||
void SendThreeDPointParameterToStream(uint32_t aIndex, const ThreeDPoint& aValue);
|
||||
void UpdatePannersVelocity();
|
||||
|
|
|
@ -23,13 +23,14 @@ namespace dom {
|
|||
class AudioParam MOZ_FINAL : public nsWrapperCache,
|
||||
public AudioParamTimeline
|
||||
{
|
||||
virtual ~AudioParam();
|
||||
|
||||
public:
|
||||
typedef void (*CallbackType)(AudioNode*);
|
||||
|
||||
AudioParam(AudioNode* aNode,
|
||||
CallbackType aCallback,
|
||||
float aDefaultValue);
|
||||
virtual ~AudioParam();
|
||||
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release(void);
|
||||
|
|
|
@ -32,7 +32,6 @@ struct WebAudioDecodeJob MOZ_FINAL
|
|||
dom::AudioContext* aContext,
|
||||
dom::DecodeSuccessCallback* aSuccessCallback = nullptr,
|
||||
dom::DecodeErrorCallback* aFailureCallback = nullptr);
|
||||
~WebAudioDecodeJob();
|
||||
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebAudioDecodeJob)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebAudioDecodeJob)
|
||||
|
@ -63,6 +62,9 @@ struct WebAudioDecodeJob MOZ_FINAL
|
|||
nsRefPtr<dom::DecodeErrorCallback> mFailureCallback; // can be null
|
||||
nsRefPtr<dom::AudioBuffer> mOutput;
|
||||
FallibleTArray<ChannelBuffer> mChannelBuffers;
|
||||
|
||||
private:
|
||||
~WebAudioDecodeJob();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -51,6 +51,8 @@ public:
|
|||
size_t SizeOfIncludingThisIfNotShared(MallocSizeOf aMallocSizeOf) const;
|
||||
|
||||
private:
|
||||
~PeriodicWave() {}
|
||||
|
||||
nsRefPtr<AudioContext> mContext;
|
||||
nsRefPtr<ThreadSharedFloatArrayBufferList> mCoefficients;
|
||||
uint32_t mLength;
|
||||
|
|
|
@ -32,7 +32,6 @@ public:
|
|||
NS_DECL_NSIOBSERVER
|
||||
|
||||
LoadMonitor(int aLoadUpdateInterval);
|
||||
~LoadMonitor();
|
||||
|
||||
nsresult Init(nsRefPtr<LoadMonitor> &self);
|
||||
void SetLoadChangeCallback(LoadNotificationCallback* aCallback);
|
||||
|
@ -43,6 +42,7 @@ public:
|
|||
friend class LoadInfoCollectRunner;
|
||||
|
||||
private:
|
||||
~LoadMonitor();
|
||||
|
||||
void SetProcessLoad(float load);
|
||||
void SetSystemLoad(float load);
|
||||
|
|
|
@ -36,7 +36,6 @@ class MediaEngineDefaultVideoSource : public nsITimerCallback,
|
|||
{
|
||||
public:
|
||||
MediaEngineDefaultVideoSource();
|
||||
~MediaEngineDefaultVideoSource();
|
||||
|
||||
virtual void GetName(nsAString&);
|
||||
virtual void GetUUID(nsAString&);
|
||||
|
@ -65,6 +64,8 @@ public:
|
|||
NS_DECL_NSITIMERCALLBACK
|
||||
|
||||
protected:
|
||||
~MediaEngineDefaultVideoSource();
|
||||
|
||||
friend class MediaEngineDefault;
|
||||
|
||||
TrackID mTrackID;
|
||||
|
@ -90,7 +91,6 @@ class MediaEngineDefaultAudioSource : public nsITimerCallback,
|
|||
{
|
||||
public:
|
||||
MediaEngineDefaultAudioSource();
|
||||
~MediaEngineDefaultAudioSource();
|
||||
|
||||
virtual void GetName(nsAString&);
|
||||
virtual void GetUUID(nsAString&);
|
||||
|
@ -119,6 +119,8 @@ public:
|
|||
NS_DECL_NSITIMERCALLBACK
|
||||
|
||||
protected:
|
||||
~MediaEngineDefaultAudioSource();
|
||||
|
||||
TrackID mTrackID;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
|
||||
|
|
|
@ -52,6 +52,9 @@ class MediaEngineTabVideoSource : public MediaEngineVideoSource, nsIDOMEventList
|
|||
nsRefPtr<MediaEngineTabVideoSource> mVideoSource;
|
||||
};
|
||||
|
||||
protected:
|
||||
~MediaEngineTabVideoSource() {}
|
||||
|
||||
private:
|
||||
int mBufW;
|
||||
int mBufH;
|
||||
|
|
|
@ -140,8 +140,6 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
~MediaEngineWebRTCVideoSource() { Shutdown(); }
|
||||
|
||||
virtual void GetName(nsAString&);
|
||||
virtual void GetUUID(nsAString&);
|
||||
virtual nsresult Allocate(const VideoTrackConstraintsN &aConstraints,
|
||||
|
@ -205,6 +203,9 @@ public:
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
protected:
|
||||
~MediaEngineWebRTCVideoSource() { Shutdown(); }
|
||||
|
||||
private:
|
||||
static const unsigned int KMaxDeviceNameLength = 128;
|
||||
static const unsigned int KMaxUniqueIdLength = 256;
|
||||
|
@ -286,7 +287,6 @@ public:
|
|||
mDeviceUUID.Assign(NS_ConvertUTF8toUTF16(uuid));
|
||||
Init();
|
||||
}
|
||||
~MediaEngineWebRTCAudioSource() { Shutdown(); }
|
||||
|
||||
virtual void GetName(nsAString&);
|
||||
virtual void GetUUID(nsAString&);
|
||||
|
@ -320,6 +320,8 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
protected:
|
||||
~MediaEngineWebRTCAudioSource() { Shutdown(); }
|
||||
|
||||
// mSamples is an int to avoid conversions when comparing/etc to
|
||||
// samplingFreq & length. Making mSamples protected instead of private is a
|
||||
// silly way to avoid -Wunused-private-field warnings when PR_LOGGING is not
|
||||
|
|
|
@ -26,7 +26,6 @@ class SpeechGrammar MOZ_FINAL : public nsISupports,
|
|||
{
|
||||
public:
|
||||
SpeechGrammar(nsISupports* aParent);
|
||||
~SpeechGrammar();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechGrammar)
|
||||
|
@ -47,6 +46,8 @@ public:
|
|||
void SetWeight(float aArg, ErrorResult& aRv);
|
||||
|
||||
private:
|
||||
~SpeechGrammar();
|
||||
|
||||
nsCOMPtr<nsISupports> mParent;
|
||||
};
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ class SpeechGrammarList MOZ_FINAL : public nsISupports,
|
|||
{
|
||||
public:
|
||||
SpeechGrammarList(nsISupports* aParent);
|
||||
~SpeechGrammarList();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechGrammarList)
|
||||
|
@ -52,6 +51,8 @@ public:
|
|||
already_AddRefed<SpeechGrammar> IndexedGetter(uint32_t aIndex, bool& aPresent, ErrorResult& aRv);
|
||||
|
||||
private:
|
||||
~SpeechGrammarList();
|
||||
|
||||
nsCOMPtr<nsISupports> mParent;
|
||||
};
|
||||
|
||||
|
|
|
@ -185,9 +185,9 @@ private:
|
|||
: mRecognition(aRecognition)
|
||||
{}
|
||||
|
||||
private:
|
||||
virtual ~GetUserMediaSuccessCallback() {}
|
||||
|
||||
private:
|
||||
nsRefPtr<SpeechRecognition> mRecognition;
|
||||
};
|
||||
|
||||
|
@ -201,9 +201,9 @@ private:
|
|||
: mRecognition(aRecognition)
|
||||
{}
|
||||
|
||||
private:
|
||||
virtual ~GetUserMediaErrorCallback() {}
|
||||
|
||||
private:
|
||||
nsRefPtr<SpeechRecognition> mRecognition;
|
||||
};
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ class SpeechRecognitionAlternative MOZ_FINAL : public nsISupports,
|
|||
{
|
||||
public:
|
||||
SpeechRecognitionAlternative(SpeechRecognition* aParent);
|
||||
~SpeechRecognitionAlternative();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionAlternative)
|
||||
|
@ -41,6 +40,8 @@ public:
|
|||
nsString mTranscript;
|
||||
float mConfidence;
|
||||
private:
|
||||
~SpeechRecognitionAlternative();
|
||||
|
||||
nsRefPtr<SpeechRecognition> mParent;
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ class SpeechRecognitionResult MOZ_FINAL : public nsISupports,
|
|||
{
|
||||
public:
|
||||
SpeechRecognitionResult(SpeechRecognition* aParent);
|
||||
~SpeechRecognitionResult();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionResult)
|
||||
|
@ -44,7 +43,10 @@ public:
|
|||
already_AddRefed<SpeechRecognitionAlternative> IndexedGetter(uint32_t aIndex, bool& aPresent);
|
||||
|
||||
nsTArray<nsRefPtr<SpeechRecognitionAlternative> > mItems;
|
||||
|
||||
private:
|
||||
~SpeechRecognitionResult();
|
||||
|
||||
nsRefPtr<SpeechRecognition> mParent;
|
||||
};
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ class SpeechRecognitionResultList MOZ_FINAL : public nsISupports,
|
|||
{
|
||||
public:
|
||||
SpeechRecognitionResultList(SpeechRecognition* aParent);
|
||||
~SpeechRecognitionResultList();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionResultList)
|
||||
|
@ -44,6 +43,8 @@ public:
|
|||
|
||||
nsTArray<nsRefPtr<SpeechRecognitionResult> > mItems;
|
||||
private:
|
||||
~SpeechRecognitionResultList();
|
||||
|
||||
nsRefPtr<SpeechRecognition> mParent;
|
||||
};
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ class SpeechSynthesis MOZ_FINAL : public nsISupports,
|
|||
{
|
||||
public:
|
||||
SpeechSynthesis(nsPIDOMWindow* aParent);
|
||||
virtual ~SpeechSynthesis();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechSynthesis)
|
||||
|
@ -56,6 +55,7 @@ public:
|
|||
void GetVoices(nsTArray< nsRefPtr<SpeechSynthesisVoice> >& aResult);
|
||||
|
||||
private:
|
||||
virtual ~SpeechSynthesis();
|
||||
|
||||
void AdvanceQueue();
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@ class SpeechSynthesisVoice MOZ_FINAL : public nsISupports,
|
|||
public:
|
||||
SpeechSynthesisVoice(nsISupports* aParent, const nsAString& aUri);
|
||||
|
||||
virtual ~SpeechSynthesisVoice();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechSynthesisVoice)
|
||||
|
||||
|
@ -49,6 +47,7 @@ public:
|
|||
bool Default() const;
|
||||
|
||||
private:
|
||||
virtual ~SpeechSynthesisVoice();
|
||||
|
||||
nsCOMPtr<nsISupports> mParent;
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@ public:
|
|||
nsSpeechTask(SpeechSynthesisUtterance* aUtterance);
|
||||
nsSpeechTask(float aVolume, const nsAString& aText);
|
||||
|
||||
virtual ~nsSpeechTask();
|
||||
|
||||
virtual void Pause();
|
||||
|
||||
virtual void Resume();
|
||||
|
@ -48,6 +46,8 @@ public:
|
|||
void SetIndirectAudio(bool aIndirectAudio) { mIndirectAudio = aIndirectAudio; }
|
||||
|
||||
protected:
|
||||
virtual ~nsSpeechTask();
|
||||
|
||||
virtual nsresult DispatchStartImpl();
|
||||
|
||||
virtual nsresult DispatchEndImpl(float aElapsedTime, uint32_t aCharIndex);
|
||||
|
|
|
@ -30,7 +30,6 @@ public:
|
|||
NS_DECL_NSISYNTHVOICEREGISTRY
|
||||
|
||||
nsSynthVoiceRegistry();
|
||||
virtual ~nsSynthVoiceRegistry();
|
||||
|
||||
already_AddRefed<nsSpeechTask> SpeakUtterance(SpeechSynthesisUtterance& aUtterance,
|
||||
const nsAString& aDocLang);
|
||||
|
@ -55,6 +54,8 @@ public:
|
|||
static void Shutdown();
|
||||
|
||||
private:
|
||||
virtual ~nsSynthVoiceRegistry();
|
||||
|
||||
VoiceData* FindBestMatch(const nsAString& aUri, const nsAString& lang);
|
||||
|
||||
bool FindVoiceByLang(const nsAString& aLang, VoiceData** aRetval);
|
||||
|
|
|
@ -79,6 +79,8 @@ class DOMSVGLength MOZ_FINAL : public nsIDOMSVGLength,
|
|||
*/
|
||||
DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement, bool aAnimVal);
|
||||
|
||||
~DOMSVGLength();
|
||||
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGLENGTH_IID)
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
@ -99,8 +101,6 @@ public:
|
|||
*/
|
||||
DOMSVGLength();
|
||||
|
||||
~DOMSVGLength();
|
||||
|
||||
static already_AddRefed<DOMSVGLength> GetTearOff(nsSVGLength2* aVal,
|
||||
nsSVGElement* aSVGElement,
|
||||
bool aAnimVal);
|
||||
|
|
|
@ -44,6 +44,15 @@ class DOMSVGLengthList MOZ_FINAL : public nsISupports,
|
|||
friend class AutoChangeLengthListNotifier;
|
||||
friend class DOMSVGLength;
|
||||
|
||||
~DOMSVGLengthList() {
|
||||
// Our mAList's weak ref to us must be nulled out when we die. If GC has
|
||||
// unlinked us using the cycle collector code, then that has already
|
||||
// happened, and mAList is null.
|
||||
if (mAList) {
|
||||
( IsAnimValList() ? mAList->mAnimVal : mAList->mBaseVal ) = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGLengthList)
|
||||
|
@ -62,15 +71,6 @@ public:
|
|||
InternalListLengthWillChange(aInternalList.Length()); // Sync mItems
|
||||
}
|
||||
|
||||
~DOMSVGLengthList() {
|
||||
// Our mAList's weak ref to us must be nulled out when we die. If GC has
|
||||
// unlinked us using the cycle collector code, then that has already
|
||||
// happened, and mAList is null.
|
||||
if (mAList) {
|
||||
( IsAnimValList() ? mAList->mAnimVal : mAList->mBaseVal ) = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
|
||||
|
||||
nsISupports* GetParentObject()
|
||||
|
|
|
@ -38,6 +38,15 @@ class DOMSVGNumber MOZ_FINAL : public nsISupports
|
|||
{
|
||||
friend class AutoChangeNumberNotifier;
|
||||
|
||||
~DOMSVGNumber() {
|
||||
// Our mList's weak ref to us must be nulled out when we die. If GC has
|
||||
// unlinked us using the cycle collector code, then that has already
|
||||
// happened, and mList is null.
|
||||
if (mList) {
|
||||
mList->mItems[mListIndex] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGNumber)
|
||||
|
@ -56,15 +65,6 @@ public:
|
|||
*/
|
||||
explicit DOMSVGNumber(nsISupports* aParent);
|
||||
|
||||
~DOMSVGNumber() {
|
||||
// Our mList's weak ref to us must be nulled out when we die. If GC has
|
||||
// unlinked us using the cycle collector code, then that has already
|
||||
// happened, and mList is null.
|
||||
if (mList) {
|
||||
mList->mItems[mListIndex] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an unowned copy. The caller is responsible for the first AddRef().
|
||||
*/
|
||||
|
|
|
@ -44,6 +44,15 @@ class DOMSVGNumberList MOZ_FINAL : public nsISupports,
|
|||
friend class AutoChangeNumberListNotifier;
|
||||
friend class DOMSVGNumber;
|
||||
|
||||
~DOMSVGNumberList() {
|
||||
// Our mAList's weak ref to us must be nulled out when we die. If GC has
|
||||
// unlinked us using the cycle collector code, then that has already
|
||||
// happened, and mAList is null.
|
||||
if (mAList) {
|
||||
( IsAnimValList() ? mAList->mAnimVal : mAList->mBaseVal ) = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGNumberList)
|
||||
|
@ -62,15 +71,6 @@ public:
|
|||
InternalListLengthWillChange(aInternalList.Length()); // Sync mItems
|
||||
}
|
||||
|
||||
~DOMSVGNumberList() {
|
||||
// Our mAList's weak ref to us must be nulled out when we die. If GC has
|
||||
// unlinked us using the cycle collector code, then that has already
|
||||
// happened, and mAList is null.
|
||||
if (mAList) {
|
||||
( IsAnimValList() ? mAList->mAnimVal : mAList->mBaseVal ) = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
|
||||
|
||||
nsISupports* GetParentObject()
|
||||
|
|
|
@ -39,6 +39,15 @@ class DOMSVGTransformList MOZ_FINAL : public nsISupports,
|
|||
friend class AutoChangeTransformListNotifier;
|
||||
friend class dom::SVGTransform;
|
||||
|
||||
~DOMSVGTransformList() {
|
||||
// Our mAList's weak ref to us must be nulled out when we die. If GC has
|
||||
// unlinked us using the cycle collector code, then that has already
|
||||
// happened, and mAList is null.
|
||||
if (mAList) {
|
||||
( IsAnimValList() ? mAList->mAnimVal : mAList->mBaseVal ) = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGTransformList)
|
||||
|
@ -57,15 +66,6 @@ public:
|
|||
InternalListLengthWillChange(aInternalList.Length()); // Sync mItems
|
||||
}
|
||||
|
||||
~DOMSVGTransformList() {
|
||||
// Our mAList's weak ref to us must be nulled out when we die. If GC has
|
||||
// unlinked us using the cycle collector code, then that has already
|
||||
// happened, and mAList is null.
|
||||
if (mAList) {
|
||||
( IsAnimValList() ? mAList->mAnimVal : mAList->mBaseVal ) = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
|
||||
|
||||
nsISupports* GetParentObject()
|
||||
|
|
|
@ -33,8 +33,6 @@ public:
|
|||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
~SVGAngle();
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() { return mSVGElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
@ -49,6 +47,8 @@ public:
|
|||
void ConvertToSpecifiedUnits(uint16_t unitType, ErrorResult& rv);
|
||||
|
||||
protected:
|
||||
~SVGAngle();
|
||||
|
||||
nsSVGAngle* mVal; // if mType is CreatedValue, we own the angle. Otherwise, the element does.
|
||||
nsRefPtr<nsSVGElement> mSVGElement;
|
||||
AngleType mType;
|
||||
|
|
|
@ -28,7 +28,6 @@ public:
|
|||
{
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
~SVGAnimatedAngle();
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() { return mSVGElement; }
|
||||
|
@ -37,6 +36,8 @@ public:
|
|||
already_AddRefed<SVGAngle> AnimVal();
|
||||
|
||||
protected:
|
||||
~SVGAnimatedAngle();
|
||||
|
||||
nsSVGAngle* mVal; // kept alive because it belongs to content
|
||||
nsRefPtr<nsSVGElement> mSVGElement;
|
||||
};
|
||||
|
|
|
@ -24,7 +24,6 @@ class SVGAnimatedBoolean MOZ_FINAL : public nsWrapperCache
|
|||
{
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
~SVGAnimatedBoolean();
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
|
@ -34,6 +33,8 @@ class SVGAnimatedBoolean MOZ_FINAL : public nsWrapperCache
|
|||
bool AnimVal() const { mSVGElement->FlushAnimations(); return mVal->GetAnimValue(); }
|
||||
|
||||
protected:
|
||||
~SVGAnimatedBoolean();
|
||||
|
||||
nsSVGBoolean* mVal; // kept alive because it belongs to content
|
||||
nsRefPtr<nsSVGElement> mSVGElement;
|
||||
};
|
||||
|
|
|
@ -27,8 +27,6 @@ public:
|
|||
: mVal(aVal), mSVGElement(aSVGElement)
|
||||
{ SetIsDOMBinding(); }
|
||||
|
||||
~SVGAnimatedLength();
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() { return mSVGElement; }
|
||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
@ -36,6 +34,8 @@ public:
|
|||
already_AddRefed<DOMSVGLength> AnimVal();
|
||||
|
||||
protected:
|
||||
~SVGAnimatedLength();
|
||||
|
||||
nsSVGLength2* mVal; // kept alive because it belongs to content
|
||||
nsRefPtr<nsSVGElement> mSVGElement;
|
||||
};
|
||||
|
|
|
@ -115,6 +115,8 @@ namespace dom {
|
|||
class DOMSVGAnimatedPreserveAspectRatio MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache
|
||||
{
|
||||
~DOMSVGAnimatedPreserveAspectRatio();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGAnimatedPreserveAspectRatio)
|
||||
|
||||
|
@ -124,7 +126,6 @@ class DOMSVGAnimatedPreserveAspectRatio MOZ_FINAL : public nsISupports,
|
|||
{
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
~DOMSVGAnimatedPreserveAspectRatio();
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
|
|
|
@ -26,8 +26,6 @@ public:
|
|||
|
||||
SVGAnimatedRect(nsSVGViewBox* aVal, nsSVGElement* aSVGElement);
|
||||
|
||||
virtual ~SVGAnimatedRect();
|
||||
|
||||
nsSVGElement* GetParentObject() const
|
||||
{
|
||||
return mSVGElement;
|
||||
|
@ -40,6 +38,8 @@ public:
|
|||
already_AddRefed<SVGIRect> GetAnimVal();
|
||||
|
||||
private:
|
||||
virtual ~SVGAnimatedRect();
|
||||
|
||||
nsSVGViewBox* mVal; // kept alive because it belongs to content
|
||||
nsRefPtr<nsSVGElement> mSVGElement;
|
||||
};
|
||||
|
|
|
@ -26,5 +26,9 @@ SVGGraphicsElement::SVGGraphicsElement(already_AddRefed<mozilla::dom::NodeInfo>&
|
|||
{
|
||||
}
|
||||
|
||||
SVGGraphicsElement::~SVGGraphicsElement()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -19,6 +19,7 @@ class SVGGraphicsElement : public SVGGraphicsElementBase,
|
|||
{
|
||||
protected:
|
||||
SVGGraphicsElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
||||
~SVGGraphicsElement();
|
||||
|
||||
public:
|
||||
// interfaces:
|
||||
|
|
|
@ -111,6 +111,8 @@ public:
|
|||
already_AddRefed<SVGMatrix> SkewY(float angle, ErrorResult& rv);
|
||||
|
||||
private:
|
||||
~SVGMatrix() {}
|
||||
|
||||
void SetMatrix(const gfxMatrix& aMatrix) {
|
||||
if (mTransform) {
|
||||
mTransform->SetMatrix(aMatrix);
|
||||
|
|
|
@ -127,7 +127,6 @@ public:
|
|||
{
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
~DOMSVGPreserveAspectRatio();
|
||||
|
||||
// WebIDL
|
||||
nsSVGElement* GetParentObject() const { return mSVGElement; }
|
||||
|
@ -139,6 +138,8 @@ public:
|
|||
void SetMeetOrSlice(uint16_t aMeetOrSlice, ErrorResult& rv);
|
||||
|
||||
protected:
|
||||
~DOMSVGPreserveAspectRatio();
|
||||
|
||||
SVGAnimatedPreserveAspectRatio* mVal; // kept alive because it belongs to mSVGElement
|
||||
nsRefPtr<nsSVGElement> mSVGElement;
|
||||
const bool mIsBaseValue;
|
||||
|
|
|
@ -72,6 +72,8 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
~SVGRect() {}
|
||||
|
||||
nsCOMPtr<nsIContent> mParent;
|
||||
float mX, mY, mWidth, mHeight;
|
||||
};
|
||||
|
|
|
@ -70,6 +70,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGTranslatePoint)
|
|||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
SVGSVGElement::~SVGSVGElement()
|
||||
{
|
||||
}
|
||||
|
||||
nsISVGPoint*
|
||||
DOMSVGTranslatePoint::Clone()
|
||||
{
|
||||
|
|
|
@ -99,6 +99,8 @@ class SVGSVGElement MOZ_FINAL : public SVGSVGElementBase
|
|||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
|
||||
mozilla::dom::FromParser aFromParser));
|
||||
|
||||
~SVGSVGElement();
|
||||
|
||||
public:
|
||||
// interfaces:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -30,7 +30,6 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
SVGTests();
|
||||
virtual ~SVGTests() {}
|
||||
|
||||
friend class mozilla::DOMSVGStringList;
|
||||
typedef mozilla::SVGStringList SVGStringList;
|
||||
|
@ -95,6 +94,9 @@ public:
|
|||
already_AddRefed<DOMSVGStringList> SystemLanguage();
|
||||
bool HasExtension(const nsAString& aExtension);
|
||||
|
||||
protected:
|
||||
virtual ~SVGTests() {}
|
||||
|
||||
private:
|
||||
enum { FEATURES, EXTENSIONS, LANGUAGE };
|
||||
SVGStringList mStringListAttributes[3];
|
||||
|
|
|
@ -60,8 +60,6 @@ public:
|
|||
*/
|
||||
explicit SVGTransform(const nsSVGTransform &aMatrix);
|
||||
|
||||
~SVGTransform();
|
||||
|
||||
/**
|
||||
* Create an unowned copy of an owned transform. The caller is responsible for
|
||||
* the first AddRef().
|
||||
|
@ -132,6 +130,8 @@ public:
|
|||
void SetSkewY(float angle, ErrorResult& rv);
|
||||
|
||||
protected:
|
||||
~SVGTransform();
|
||||
|
||||
// Interface for SVGMatrix's use
|
||||
friend class dom::SVGMatrix;
|
||||
const bool IsAnimVal() const {
|
||||
|
|
|
@ -63,6 +63,7 @@ public:
|
|||
mPt.mY = aPt->GetY();
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~nsISVGPoint()
|
||||
{
|
||||
// Our mList's weak ref to us must be nulled out when we die. If GC has
|
||||
|
@ -73,6 +74,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create an unowned copy of this object. The caller is responsible for the
|
||||
* first AddRef()!
|
||||
|
|
|
@ -35,6 +35,9 @@ struct DOMAnimatedString MOZ_FINAL : public SVGAnimatedString
|
|||
}
|
||||
|
||||
void GetAnimVal(nsAString& aResult) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
~DOMAnimatedString() {}
|
||||
};
|
||||
|
||||
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMAnimatedString, mSVGElement)
|
||||
|
|
|
@ -61,8 +61,6 @@ public:
|
|||
, mVal(aVal)
|
||||
{}
|
||||
|
||||
virtual ~DOMAnimatedString();
|
||||
|
||||
nsSVGString* mVal; // kept alive because it belongs to content
|
||||
|
||||
void GetBaseVal(nsAString & aResult) MOZ_OVERRIDE
|
||||
|
@ -81,6 +79,8 @@ public:
|
|||
mVal->GetAnimValue(aResult, mSVGElement);
|
||||
}
|
||||
|
||||
private:
|
||||
virtual ~DOMAnimatedString();
|
||||
};
|
||||
struct SMILString : public nsISMILAttr
|
||||
{
|
||||
|
|
|
@ -40,7 +40,6 @@ struct nsSVGViewBoxRect
|
|||
|
||||
class nsSVGViewBox
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
void Init();
|
||||
|
@ -109,7 +108,6 @@ public:
|
|||
, mVal(aVal)
|
||||
, mSVGElement(aSVGElement)
|
||||
{}
|
||||
virtual ~DOMBaseVal();
|
||||
|
||||
nsSVGViewBox* mVal; // kept alive because it belongs to content
|
||||
nsRefPtr<nsSVGElement> mSVGElement;
|
||||
|
@ -143,6 +141,9 @@ public:
|
|||
{
|
||||
return mSVGElement;
|
||||
}
|
||||
|
||||
private:
|
||||
virtual ~DOMBaseVal();
|
||||
};
|
||||
|
||||
struct DOMAnimVal MOZ_FINAL : public mozilla::dom::SVGIRect
|
||||
|
@ -155,7 +156,6 @@ public:
|
|||
, mVal(aVal)
|
||||
, mSVGElement(aSVGElement)
|
||||
{}
|
||||
virtual ~DOMAnimVal();
|
||||
|
||||
nsSVGViewBox* mVal; // kept alive because it belongs to content
|
||||
nsRefPtr<nsSVGElement> mSVGElement;
|
||||
|
@ -210,6 +210,10 @@ public:
|
|||
{
|
||||
return mSVGElement;
|
||||
}
|
||||
|
||||
private:
|
||||
virtual ~DOMAnimVal();
|
||||
|
||||
};
|
||||
|
||||
struct SMILViewBox : public nsISMILAttr
|
||||
|
@ -238,4 +242,12 @@ public:
|
|||
sSVGAnimatedRectTearoffTable;
|
||||
};
|
||||
|
||||
namespace mozilla {
|
||||
template<>
|
||||
struct HasDangerousPublicDestructor<nsSVGViewBox>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // __NS_SVGVIEWBOX_H__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
This is sqlite 3.8.4.2
|
||||
This is sqlite 3.8.5
|
||||
|
||||
-- Ryan VanderMeulen <ryanvm@gmail.com>, 03/2014
|
||||
-- Ryan VanderMeulen <ryanvm@gmail.com>, 06/2014
|
||||
|
||||
See http://www.sqlite.org/ for more info.
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -107,9 +107,9 @@ extern "C" {
|
|||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.8.4.2"
|
||||
#define SQLITE_VERSION_NUMBER 3008004
|
||||
#define SQLITE_SOURCE_ID "2014-03-26 18:51:19 02ea166372bdb2ef9d8dfbb05e78a97609673a8e"
|
||||
#define SQLITE_VERSION "3.8.5"
|
||||
#define SQLITE_VERSION_NUMBER 3008005
|
||||
#define SQLITE_SOURCE_ID "2014-06-04 14:06:34 b1ed4f2a34ba66c29b130f8d13e9092758019212"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
|
@ -560,7 +560,10 @@ SQLITE_API int sqlite3_exec(
|
|||
** file that were written at the application level might have changed
|
||||
** and that adjacent bytes, even bytes within the same sector are
|
||||
** guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
|
||||
** flag indicate that a file cannot be deleted when open.
|
||||
** flag indicate that a file cannot be deleted when open. The
|
||||
** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on
|
||||
** read-only media and cannot be changed even by processes with
|
||||
** elevated privileges.
|
||||
*/
|
||||
#define SQLITE_IOCAP_ATOMIC 0x00000001
|
||||
#define SQLITE_IOCAP_ATOMIC512 0x00000002
|
||||
|
@ -575,6 +578,7 @@ SQLITE_API int sqlite3_exec(
|
|||
#define SQLITE_IOCAP_SEQUENTIAL 0x00000400
|
||||
#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800
|
||||
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
|
||||
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
|
||||
|
||||
/*
|
||||
** CAPI3REF: File Locking Levels
|
||||
|
@ -943,6 +947,12 @@ struct sqlite3_io_methods {
|
|||
** on whether or not the file has been renamed, moved, or deleted since it
|
||||
** was first opened.
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
|
||||
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
|
||||
** opcode causes the xFileControl method to swap the file handle with the one
|
||||
** pointed to by the pArg argument. This capability is used during testing
|
||||
** and only needs to be supported when SQLITE_TEST is defined.
|
||||
**
|
||||
** </ul>
|
||||
*/
|
||||
#define SQLITE_FCNTL_LOCKSTATE 1
|
||||
|
@ -966,6 +976,7 @@ struct sqlite3_io_methods {
|
|||
#define SQLITE_FCNTL_HAS_MOVED 20
|
||||
#define SQLITE_FCNTL_SYNC 21
|
||||
#define SQLITE_FCNTL_COMMIT_PHASETWO 22
|
||||
#define SQLITE_FCNTL_WIN32_SET_HANDLE 23
|
||||
|
||||
/*
|
||||
** CAPI3REF: Mutex Handle
|
||||
|
@ -2779,6 +2790,30 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
|||
** ^If sqlite3_open_v2() is used and the "cache" parameter is present in
|
||||
** a URI filename, its value overrides any behavior requested by setting
|
||||
** SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag.
|
||||
**
|
||||
** <li> <b>psow</b>: ^The psow parameter may be "true" (or "on" or "yes" or
|
||||
** "1") or "false" (or "off" or "no" or "0") to indicate that the
|
||||
** [powersafe overwrite] property does or does not apply to the
|
||||
** storage media on which the database file resides. ^The psow query
|
||||
** parameter only works for the built-in unix and Windows VFSes.
|
||||
**
|
||||
** <li> <b>nolock</b>: ^The nolock parameter is a boolean query parameter
|
||||
** which if set disables file locking in rollback journal modes. This
|
||||
** is useful for accessing a database on a filesystem that does not
|
||||
** support locking. Caution: Database corruption might result if two
|
||||
** or more processes write to the same database and any one of those
|
||||
** processes uses nolock=1.
|
||||
**
|
||||
** <li> <b>immutable</b>: ^The immutable parameter is a boolean query
|
||||
** parameter that indicates that the database file is stored on
|
||||
** read-only media. ^When immutable is set, SQLite assumes that the
|
||||
** database file cannot be changed, even by a process with higher
|
||||
** privilege, and so the database is opened read-only and all locking
|
||||
** and change detection is disabled. Caution: Setting the immutable
|
||||
** property on a database file that does in fact change can result
|
||||
** in incorrect query results and/or [SQLITE_CORRUPT] errors.
|
||||
** See also: [SQLITE_IOCAP_IMMUTABLE].
|
||||
**
|
||||
** </ul>
|
||||
**
|
||||
** ^Specifying an unknown parameter in the query component of a URI is not an
|
||||
|
@ -2808,8 +2843,9 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
|||
** Open file "data.db" in the current directory for read-only access.
|
||||
** Regardless of whether or not shared-cache mode is enabled by
|
||||
** default, use a private cache.
|
||||
** <tr><td> file:/home/fred/data.db?vfs=unix-nolock <td>
|
||||
** Open file "/home/fred/data.db". Use the special VFS "unix-nolock".
|
||||
** <tr><td> file:/home/fred/data.db?vfs=unix-dotfile <td>
|
||||
** Open file "/home/fred/data.db". Use the special VFS "unix-dotfile"
|
||||
** that uses dot-files in place of posix advisory locking.
|
||||
** <tr><td> file:data.db?mode=readonly <td>
|
||||
** An error. "readonly" is not a valid option for the "mode" parameter.
|
||||
** </table>
|
||||
|
@ -6123,7 +6159,8 @@ SQLITE_API int sqlite3_test_control(int op, ...);
|
|||
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19
|
||||
#define SQLITE_TESTCTRL_NEVER_CORRUPT 20
|
||||
#define SQLITE_TESTCTRL_VDBE_COVERAGE 21
|
||||
#define SQLITE_TESTCTRL_LAST 21
|
||||
#define SQLITE_TESTCTRL_BYTEORDER 22
|
||||
#define SQLITE_TESTCTRL_LAST 22
|
||||
|
||||
/*
|
||||
** CAPI3REF: SQLite Runtime Status
|
||||
|
@ -7346,6 +7383,16 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry;
|
||||
typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;
|
||||
|
||||
/* The double-precision datatype used by RTree depends on the
|
||||
** SQLITE_RTREE_INT_ONLY compile-time option.
|
||||
*/
|
||||
#ifdef SQLITE_RTREE_INT_ONLY
|
||||
typedef sqlite3_int64 sqlite3_rtree_dbl;
|
||||
#else
|
||||
typedef double sqlite3_rtree_dbl;
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Register a geometry callback named zGeom that can be used as part of an
|
||||
|
@ -7356,11 +7403,7 @@ typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry;
|
|||
SQLITE_API int sqlite3_rtree_geometry_callback(
|
||||
sqlite3 *db,
|
||||
const char *zGeom,
|
||||
#ifdef SQLITE_RTREE_INT_ONLY
|
||||
int (*xGeom)(sqlite3_rtree_geometry*, int n, sqlite3_int64 *a, int *pRes),
|
||||
#else
|
||||
int (*xGeom)(sqlite3_rtree_geometry*, int n, double *a, int *pRes),
|
||||
#endif
|
||||
int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
|
||||
void *pContext
|
||||
);
|
||||
|
||||
|
@ -7372,11 +7415,60 @@ SQLITE_API int sqlite3_rtree_geometry_callback(
|
|||
struct sqlite3_rtree_geometry {
|
||||
void *pContext; /* Copy of pContext passed to s_r_g_c() */
|
||||
int nParam; /* Size of array aParam[] */
|
||||
double *aParam; /* Parameters passed to SQL geom function */
|
||||
sqlite3_rtree_dbl *aParam; /* Parameters passed to SQL geom function */
|
||||
void *pUser; /* Callback implementation user data */
|
||||
void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */
|
||||
};
|
||||
|
||||
/*
|
||||
** Register a 2nd-generation geometry callback named zScore that can be
|
||||
** used as part of an R-Tree geometry query as follows:
|
||||
**
|
||||
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zQueryFunc(... params ...)
|
||||
*/
|
||||
SQLITE_API int sqlite3_rtree_query_callback(
|
||||
sqlite3 *db,
|
||||
const char *zQueryFunc,
|
||||
int (*xQueryFunc)(sqlite3_rtree_query_info*),
|
||||
void *pContext,
|
||||
void (*xDestructor)(void*)
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
** A pointer to a structure of the following type is passed as the
|
||||
** argument to scored geometry callback registered using
|
||||
** sqlite3_rtree_query_callback().
|
||||
**
|
||||
** Note that the first 5 fields of this structure are identical to
|
||||
** sqlite3_rtree_geometry. This structure is a subclass of
|
||||
** sqlite3_rtree_geometry.
|
||||
*/
|
||||
struct sqlite3_rtree_query_info {
|
||||
void *pContext; /* pContext from when function registered */
|
||||
int nParam; /* Number of function parameters */
|
||||
sqlite3_rtree_dbl *aParam; /* value of function parameters */
|
||||
void *pUser; /* callback can use this, if desired */
|
||||
void (*xDelUser)(void*); /* function to free pUser */
|
||||
sqlite3_rtree_dbl *aCoord; /* Coordinates of node or entry to check */
|
||||
unsigned int *anQueue; /* Number of pending entries in the queue */
|
||||
int nCoord; /* Number of coordinates */
|
||||
int iLevel; /* Level of current node or entry */
|
||||
int mxLevel; /* The largest iLevel value in the tree */
|
||||
sqlite3_int64 iRowid; /* Rowid for current entry */
|
||||
sqlite3_rtree_dbl rParentScore; /* Score of parent node */
|
||||
int eParentWithin; /* Visibility of parent node */
|
||||
int eWithin; /* OUT: Visiblity */
|
||||
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
|
||||
};
|
||||
|
||||
/*
|
||||
** Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
|
||||
*/
|
||||
#define NOT_WITHIN 0 /* Object completely outside of query region */
|
||||
#define PARTLY_WITHIN 1 /* Object partially overlaps query region */
|
||||
#define FULLY_WITHIN 2 /* Object fully contained within query region */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of the 'extern "C"' block */
|
||||
|
|
|
@ -23,12 +23,18 @@
|
|||
#include "nsIObserverService.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
// Used to check if external protocol schemes are usable
|
||||
#include "nsCExternalHandlerService.h"
|
||||
#include "nsIExternalProtocolService.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
/* Implementation file */
|
||||
NS_IMPL_ISUPPORTS(nsDefaultURIFixup, nsIURIFixup)
|
||||
|
||||
static bool sInitializedPrefCaches = false;
|
||||
static bool sFixTypos = true;
|
||||
static bool sFixupKeywords = true;
|
||||
|
||||
nsDefaultURIFixup::nsDefaultURIFixup()
|
||||
{
|
||||
|
@ -203,12 +209,19 @@ nsDefaultURIFixup::CreateFixupURI(const nsACString& aStringURI, uint32_t aFixupF
|
|||
#endif
|
||||
}
|
||||
|
||||
// Check if we want to fix up common scheme typos.
|
||||
rv = Preferences::AddBoolVarCache(&sFixTypos,
|
||||
"browser.fixup.typo.scheme",
|
||||
sFixTypos);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv),
|
||||
"Failed to observe \"browser.fixup.typo.scheme\"");
|
||||
if (!sInitializedPrefCaches) {
|
||||
// Check if we want to fix up common scheme typos.
|
||||
rv = Preferences::AddBoolVarCache(&sFixTypos,
|
||||
"browser.fixup.typo.scheme",
|
||||
sFixTypos);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv),
|
||||
"Failed to observe \"browser.fixup.typo.scheme\"");
|
||||
|
||||
rv = Preferences::AddBoolVarCache(&sFixupKeywords, "keyword.enabled",
|
||||
sFixupKeywords);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv), "Failed to observe \"keyword.enabled\"");
|
||||
sInitializedPrefCaches = true;
|
||||
}
|
||||
|
||||
// Fix up common scheme typos.
|
||||
if (sFixTypos && (aFixupFlags & FIXUP_FLAG_FIX_SCHEME_TYPOS)) {
|
||||
|
@ -262,6 +275,27 @@ nsDefaultURIFixup::CreateFixupURI(const nsACString& aStringURI, uint32_t aFixupF
|
|||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
if (*aURI && ourHandler == extHandler && sFixupKeywords &&
|
||||
(aFixupFlags & FIXUP_FLAG_FIX_SCHEME_TYPOS)) {
|
||||
nsCOMPtr<nsIExternalProtocolService> extProtService =
|
||||
do_GetService(NS_EXTERNALPROTOCOLSERVICE_CONTRACTID);
|
||||
if (extProtService) {
|
||||
bool handlerExists = false;
|
||||
rv = extProtService->ExternalProtocolHandlerExists(scheme.get(), &handlerExists);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
// This basically means we're dealing with a theoretically valid
|
||||
// URI... but we have no idea how to load it. (e.g. "christmas:humbug")
|
||||
// It's more likely the user wants to search, and so we
|
||||
// chuck this over to their preferred search provider instead:
|
||||
if (!handlerExists) {
|
||||
NS_RELEASE(*aURI);
|
||||
KeywordToURI(uriString, aPostData, aURI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (*aURI) {
|
||||
if (aFixupFlags & FIXUP_FLAGS_MAKE_ALTERNATE_URI)
|
||||
|
@ -271,16 +305,10 @@ nsDefaultURIFixup::CreateFixupURI(const nsACString& aStringURI, uint32_t aFixupF
|
|||
|
||||
// See if it is a keyword
|
||||
// Test whether keywords need to be fixed up
|
||||
bool fixupKeywords = false;
|
||||
if (aFixupFlags & FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP) {
|
||||
nsresult rv = Preferences::GetBool("keyword.enabled", &fixupKeywords);
|
||||
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
|
||||
if (fixupKeywords)
|
||||
{
|
||||
KeywordURIFixup(uriString, aPostData, aURI);
|
||||
if(*aURI)
|
||||
return NS_OK;
|
||||
}
|
||||
if (sFixupKeywords && (aFixupFlags & FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP)) {
|
||||
KeywordURIFixup(uriString, aPostData, aURI);
|
||||
if(*aURI)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Prune duff protocol schemes
|
||||
|
@ -337,7 +365,7 @@ nsDefaultURIFixup::CreateFixupURI(const nsACString& aStringURI, uint32_t aFixupF
|
|||
|
||||
// If we still haven't been able to construct a valid URI, try to force a
|
||||
// keyword match. This catches search strings with '.' or ':' in them.
|
||||
if (!*aURI && fixupKeywords)
|
||||
if (!*aURI && sFixupKeywords)
|
||||
{
|
||||
KeywordToURI(aStringURI, aPostData, aURI);
|
||||
if(*aURI)
|
||||
|
@ -397,21 +425,21 @@ NS_IMETHODIMP nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword,
|
|||
searchSvc->GetDefaultEngine(getter_AddRefs(defaultEngine));
|
||||
if (defaultEngine) {
|
||||
nsCOMPtr<nsISearchSubmission> submission;
|
||||
nsAutoString responseType;
|
||||
// We allow default search plugins to specify alternate
|
||||
// parameters that are specific to keyword searches.
|
||||
NS_NAMED_LITERAL_STRING(mozKeywordSearch, "application/x-moz-keywordsearch");
|
||||
bool supportsResponseType = false;
|
||||
defaultEngine->SupportsResponseType(mozKeywordSearch, &supportsResponseType);
|
||||
if (supportsResponseType)
|
||||
defaultEngine->GetSubmission(NS_ConvertUTF8toUTF16(keyword),
|
||||
mozKeywordSearch,
|
||||
NS_LITERAL_STRING("keyword"),
|
||||
getter_AddRefs(submission));
|
||||
else
|
||||
defaultEngine->GetSubmission(NS_ConvertUTF8toUTF16(keyword),
|
||||
EmptyString(),
|
||||
NS_LITERAL_STRING("keyword"),
|
||||
getter_AddRefs(submission));
|
||||
if (supportsResponseType) {
|
||||
responseType.Assign(mozKeywordSearch);
|
||||
}
|
||||
|
||||
defaultEngine->GetSubmission(NS_ConvertUTF8toUTF16(keyword),
|
||||
responseType,
|
||||
NS_LITERAL_STRING("keyword"),
|
||||
getter_AddRefs(submission));
|
||||
|
||||
if (submission) {
|
||||
nsCOMPtr<nsIInputStream> postData;
|
||||
submission->GetPostData(getter_AddRefs(postData));
|
||||
|
|
|
@ -1571,9 +1571,6 @@ nsDocShell::LoadURI(nsIURI * aURI,
|
|||
if (aLoadFlags & LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP)
|
||||
flags |= INTERNAL_LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
|
||||
|
||||
if (aLoadFlags & LOAD_FLAGS_FIXUP_SCHEME_TYPOS)
|
||||
flags |= INTERNAL_LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
|
||||
|
||||
if (aLoadFlags & LOAD_FLAGS_FIRST_LOAD)
|
||||
flags |= INTERNAL_LOAD_FLAGS_FIRST_LOAD;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ interface nsITabParent;
|
|||
|
||||
typedef unsigned long nsLoadFlags;
|
||||
|
||||
[scriptable, builtinclass, uuid(2a099e83-44df-415a-be76-c145966074e7)]
|
||||
[scriptable, builtinclass, uuid(e5fe5c76-e511-4da3-9709-f8294b8dc5ce)]
|
||||
interface nsIDocShell : nsIDocShellTreeItem
|
||||
{
|
||||
/**
|
||||
|
@ -113,9 +113,10 @@ interface nsIDocShell : nsIDocShellTreeItem
|
|||
// Whether the load should be treated as srcdoc load, rather than a URI one.
|
||||
const long INTERNAL_LOAD_FLAGS_IS_SRCDOC = 0x40;
|
||||
|
||||
const long INTERNAL_LOAD_FLAGS_FIXUP_SCHEME_TYPOS = 0x80;
|
||||
const long INTERNAL_LOAD_FLAGS_NO_OPENER = 0x100;
|
||||
|
||||
// NB: 0x80 is available.
|
||||
|
||||
/**
|
||||
* Loads the given URI. This method is identical to loadURI(...) except
|
||||
* that its parameter list is broken out instead of being packaged inside
|
||||
|
|
|
@ -88,6 +88,8 @@ skip-if = e10s # Bug ?????? - event handler checks event.target is the content d
|
|||
skip-if = e10s # Bug ?????? - BrowserSetForcedCharacterSet() in browser.js references docShell
|
||||
[browser_bug941562.js]
|
||||
skip-if = e10s # Bug ?????? - event handler checks event.target is the content document and test e10s-utils doesn't do that.
|
||||
[browser_uriFixupIntegration.js]
|
||||
skip-if = e10s
|
||||
[browser_loadDisallowInherit.js]
|
||||
[browser_loadURI.js]
|
||||
skip-if = e10s # Bug ?????? - event handler checks event.target is the content document and test e10s-utils doesn't do that.
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
const kSearchEngineID = "browser_urifixup_search_engine";
|
||||
const kTest
|
||||
const kSearchEngineURL = "http://example.com/?search={searchTerms}";
|
||||
Services.search.addEngineWithDetails(kSearchEngineID, "", "", "", "get",
|
||||
kSearchEngineURL);
|
||||
|
||||
let oldDefaultEngine = Services.search.defaultEngine;
|
||||
Services.search.defaultEngine = Services.search.getEngineByName(kSearchEngineID);
|
||||
|
||||
let tab;
|
||||
let searchParams;
|
||||
|
||||
function checkURL() {
|
||||
let escapedParams = encodeURIComponent(searchParams).replace("%20", "+");
|
||||
let expectedURL = kSearchEngineURL.replace("{searchTerms}", escapedParams);
|
||||
is(tab.linkedBrowser.currentURI.spec, expectedURL,
|
||||
"New tab should have loaded with expected url.");
|
||||
}
|
||||
|
||||
function addPageShowListener(aFunc) {
|
||||
gBrowser.selectedBrowser.addEventListener("pageshow", function loadListener() {
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", loadListener, false);
|
||||
aFunc();
|
||||
});
|
||||
}
|
||||
|
||||
function locationBarEnter(aCallback) {
|
||||
executeSoon(function() {
|
||||
gURLBar.focus();
|
||||
EventUtils.synthesizeKey("VK_RETURN", {});
|
||||
addPageShowListener(aCallback);
|
||||
});
|
||||
}
|
||||
|
||||
let urlbarInput = [
|
||||
"foo bar",
|
||||
"brokenprotocol:somethingelse"
|
||||
];
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
nextTest();
|
||||
}
|
||||
|
||||
function nextTest() {
|
||||
searchParams = urlbarInput.pop();
|
||||
tab = gBrowser.selectedTab = gBrowser.addTab();
|
||||
|
||||
gURLBar.value = searchParams;
|
||||
locationBarEnter(function() {
|
||||
checkURL();
|
||||
gBrowser.removeTab(tab);
|
||||
tab = null;
|
||||
if (urlbarInput.length) {
|
||||
nextTest();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
registerCleanupFunction(function () {
|
||||
if (tab) {
|
||||
gBrowser.removeTab(tab);
|
||||
}
|
||||
|
||||
if (oldDefaultEngine) {
|
||||
Services.search.defaultEngine = oldDefaultEngine;
|
||||
}
|
||||
let engine = Services.search.getEngineByName(kSearchEngineID);
|
||||
if (engine) {
|
||||
Services.search.removeEngine(engine);
|
||||
}
|
||||
});
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
let urifixup = Cc["@mozilla.org/docshell/urifixup;1"].
|
||||
getService(Ci.nsIURIFixup);
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
Services.prefs.setBoolPref("keyword.enabled", true);
|
||||
|
||||
const kSearchEngineID = "test_urifixup_search_engine";
|
||||
const kSearchEngineURL = "http://www.example.org/?search={searchTerms}";
|
||||
Services.search.addEngineWithDetails(kSearchEngineID, "", "", "", "get",
|
||||
kSearchEngineURL);
|
||||
|
||||
let oldDefaultEngine = Services.search.defaultEngine;
|
||||
Services.search.defaultEngine = Services.search.getEngineByName(kSearchEngineID);
|
||||
|
||||
let selectedName = Services.search.defaultEngine.name;
|
||||
do_check_eq(selectedName, kSearchEngineID);
|
||||
|
||||
do_register_cleanup(function() {
|
||||
if (oldDefaultEngine) {
|
||||
Services.search.defaultEngine = oldDefaultEngine;
|
||||
}
|
||||
let engine = Services.search.getEngineByName(kSearchEngineID);
|
||||
if (engine) {
|
||||
Services.search.removeEngine(engine);
|
||||
}
|
||||
Services.prefs.clearUserPref("keyword.enabled");
|
||||
});
|
||||
|
||||
let data = [
|
||||
{
|
||||
// Valid should not be changed.
|
||||
wrong: 'https://example.com/this/is/a/test.html',
|
||||
fixed: 'https://example.com/this/is/a/test.html',
|
||||
},
|
||||
{
|
||||
// Unrecognized protocols should be changed.
|
||||
wrong: 'whatever://this/is/a/test.html',
|
||||
fixed: kSearchEngineURL.replace("{searchTerms}", encodeURIComponent('whatever://this/is/a/test.html')),
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
function run_test() {
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
let len = data.length;
|
||||
// Make sure we fix what needs fixing
|
||||
add_task(function test_fix_unknown_schemes() {
|
||||
for (let i = 0; i < len; ++i) {
|
||||
let item = data[i];
|
||||
let result =
|
||||
urifixup.createFixupURI(item.wrong,
|
||||
urifixup.FIXUP_FLAG_FIX_SCHEME_TYPOS).spec;
|
||||
do_check_eq(result, item.fixed);
|
||||
}
|
||||
});
|
|
@ -5,6 +5,8 @@ tail =
|
|||
[test_bug414201_jfif.js]
|
||||
[test_bug442584.js]
|
||||
[test_nsDefaultURIFixup.js]
|
||||
[test_nsDefaultURIFixup_search.js]
|
||||
skip-if = os == 'android'
|
||||
[test_nsIDownloadHistory.js]
|
||||
[test_pb_notification.js]
|
||||
# Bug 751575: unrelated JS changes cause timeouts on random platforms
|
||||
|
|
|
@ -51,6 +51,7 @@ BluetoothUuidHelper::GetBluetoothServiceClass(uint16_t aServiceUuid)
|
|||
BluetoothServiceClass retValue = BluetoothServiceClass::UNKNOWN;
|
||||
switch (aServiceUuid) {
|
||||
case BluetoothServiceClass::A2DP:
|
||||
case BluetoothServiceClass::A2DP_SINK:
|
||||
case BluetoothServiceClass::HANDSFREE:
|
||||
case BluetoothServiceClass::HANDSFREE_AG:
|
||||
case BluetoothServiceClass::HEADSET:
|
||||
|
|
|
@ -25,6 +25,7 @@ class BluetoothProfileManagerBase;
|
|||
enum BluetoothServiceClass
|
||||
{
|
||||
A2DP = 0x110D,
|
||||
A2DP_SINK = 0x110B,
|
||||
HANDSFREE = 0x111E,
|
||||
HANDSFREE_AG = 0x111F,
|
||||
HEADSET = 0x1108,
|
||||
|
|
|
@ -42,6 +42,12 @@
|
|||
} \
|
||||
} while(0)
|
||||
|
||||
#define MAX_UUID_SIZE 16
|
||||
// Audio: Major service class = 0x100 (Bit 21 is set)
|
||||
#define SET_AUDIO_BIT(cod) (cod |= 0x200000)
|
||||
// Rendering: Major service class = 0x20 (Bit 18 is set)
|
||||
#define SET_RENDERING_BIT(cod) (cod |= 0x40000)
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::ipc;
|
||||
USING_BLUETOOTH_NAMESPACE
|
||||
|
@ -482,6 +488,7 @@ RemoteDevicePropertiesCallback(bt_status_t aStatus, bt_bdaddr_t *aBdAddress,
|
|||
BdAddressTypeToString(aBdAddress, remoteDeviceBdAddress);
|
||||
BT_APPEND_NAMED_VALUE(props, "Address", remoteDeviceBdAddress);
|
||||
|
||||
bool isCodInvalid = false;
|
||||
for (int i = 0; i < aNumProperties; ++i) {
|
||||
bt_property_t p = aProperties[i];
|
||||
|
||||
|
@ -490,11 +497,53 @@ RemoteDevicePropertiesCallback(bt_status_t aStatus, bt_bdaddr_t *aBdAddress,
|
|||
BT_APPEND_NAMED_VALUE(props, "Name", propertyValue);
|
||||
} else if (p.type == BT_PROPERTY_CLASS_OF_DEVICE) {
|
||||
uint32_t cod = *(uint32_t*)p.val;
|
||||
BT_APPEND_NAMED_VALUE(props, "Class", cod);
|
||||
|
||||
nsString icon;
|
||||
ClassToIcon(cod, icon);
|
||||
BT_APPEND_NAMED_VALUE(props, "Icon", icon);
|
||||
if (!icon.IsEmpty()) {
|
||||
// Valid CoD
|
||||
BT_APPEND_NAMED_VALUE(props, "Class", cod);
|
||||
BT_APPEND_NAMED_VALUE(props, "Icon", icon);
|
||||
} else {
|
||||
// If Cod is invalid, fallback to check UUIDs. It usually happens due to
|
||||
// NFC directly trigger pairing. bluedroid sends wrong CoD due to missing
|
||||
// EIR query records.
|
||||
isCodInvalid = true;
|
||||
}
|
||||
} else if (p.type == BT_PROPERTY_UUIDS) {
|
||||
InfallibleTArray<nsString> uuidsArray;
|
||||
int uuidListLength = p.len / MAX_UUID_SIZE;
|
||||
uint32_t cod = 0;
|
||||
|
||||
for (int i = 0; i < uuidListLength; i++) {
|
||||
uint16_t uuidServiceClass = UuidToServiceClassInt((bt_uuid_t*)(p.val +
|
||||
(i * MAX_UUID_SIZE)));
|
||||
BluetoothServiceClass serviceClass = BluetoothUuidHelper::
|
||||
GetBluetoothServiceClass(uuidServiceClass);
|
||||
|
||||
// Get Uuid string from BluetoothServiceClass
|
||||
nsString uuid;
|
||||
BluetoothUuidHelper::GetString(serviceClass, uuid);
|
||||
uuidsArray.AppendElement(uuid);
|
||||
|
||||
// Restore CoD value
|
||||
if (isCodInvalid) {
|
||||
if (serviceClass == BluetoothServiceClass::HANDSFREE ||
|
||||
serviceClass == BluetoothServiceClass::HEADSET) {
|
||||
BT_LOGD("Restore Class Of Device to Audio bit");
|
||||
SET_AUDIO_BIT(cod);
|
||||
} else if (serviceClass == BluetoothServiceClass::A2DP_SINK) {
|
||||
BT_LOGD("Restore Class of Device to Rendering bit");
|
||||
SET_RENDERING_BIT(cod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isCodInvalid) {
|
||||
BT_APPEND_NAMED_VALUE(props, "Class", cod);
|
||||
// 'audio-card' refers to 'Audio' device
|
||||
BT_APPEND_NAMED_VALUE(props, "Icon", NS_LITERAL_STRING("audio-card"));
|
||||
}
|
||||
BT_APPEND_NAMED_VALUE(props, "UUIDS", uuidsArray);
|
||||
} else {
|
||||
BT_LOGD("Other non-handled device properties. Type: %d", p.type);
|
||||
}
|
||||
|
|
|
@ -55,6 +55,15 @@ BdAddressTypeToString(bt_bdaddr_t* aBdAddressType, nsAString& aRetBdAddress)
|
|||
aRetBdAddress = NS_ConvertUTF8toUTF16(bdstr);
|
||||
}
|
||||
|
||||
uint16_t
|
||||
UuidToServiceClassInt(bt_uuid_t* p_uuid)
|
||||
{
|
||||
// extract short UUID 0000xxxx-0000-1000-8000-00805f9b34fb
|
||||
uint16_t shortUuid;
|
||||
memcpy(&shortUuid, &(p_uuid->uu[2]), sizeof(uint16_t));
|
||||
return ntohs(shortUuid);
|
||||
}
|
||||
|
||||
bool
|
||||
SetJsObject(JSContext* aContext,
|
||||
const BluetoothValue& aValue,
|
||||
|
|
|
@ -29,6 +29,9 @@ void
|
|||
BdAddressTypeToString(bt_bdaddr_t* aBdAddressType,
|
||||
nsAString& aRetBdAddress);
|
||||
|
||||
uint16_t
|
||||
UuidToServiceClassInt(bt_uuid_t* p_uuid);
|
||||
|
||||
bool
|
||||
SetJsObject(JSContext* aContext,
|
||||
const BluetoothValue& aValue,
|
||||
|
|
|
@ -88,9 +88,12 @@ USING_BLUETOOTH_NAMESPACE
|
|||
* turn off Bluetooth.
|
||||
*/
|
||||
#define TIMEOUT_FORCE_TO_DISABLE_BT 5
|
||||
|
||||
#define BT_LAZY_THREAD_TIMEOUT_MS 3000
|
||||
|
||||
// Set Class of Device value bit
|
||||
#define SET_AUDIO_BIT(cod) (cod |= 0x200000)
|
||||
#define SET_RENDERING_BIT(cod) (cod |= 0x40000)
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
class Bluedroid
|
||||
{
|
||||
|
@ -821,15 +824,17 @@ HasAudioService(uint32_t aCodValue)
|
|||
return ((aCodValue & 0x200000) == 0x200000);
|
||||
}
|
||||
|
||||
static bool
|
||||
ContainsIcon(const InfallibleTArray<BluetoothNamedValue>& aProperties)
|
||||
static int
|
||||
FindProperty(const InfallibleTArray<BluetoothNamedValue>& aProperties,
|
||||
const char* aPropertyType)
|
||||
{
|
||||
for (uint8_t i = 0; i < aProperties.Length(); i++) {
|
||||
if (aProperties[i].name().EqualsLiteral("Icon")) {
|
||||
return true;
|
||||
for (int i = 0; i < aProperties.Length(); ++i) {
|
||||
if (aProperties[i].name().EqualsASCII(aPropertyType)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -1766,7 +1771,7 @@ EventFilter(DBusConnection* aConn, DBusMessage* aMsg, void* aData)
|
|||
BluetoothNamedValue(NS_LITERAL_STRING("Path"),
|
||||
GetObjectPathFromAddress(signalPath, address)));
|
||||
|
||||
if (!ContainsIcon(properties)) {
|
||||
if (FindProperty(properties, "Icon") < 0) {
|
||||
for (uint32_t i = 0; i < properties.Length(); i++) {
|
||||
// It is possible that property Icon missed due to CoD of major
|
||||
// class is TOY but service class is "Audio", we need to assign
|
||||
|
@ -2688,7 +2693,7 @@ public:
|
|||
// Icon as audio-card. This is for PTS test TC_AG_COD_BV_02_I.
|
||||
// As HFP specification defined that
|
||||
// service class is "Audio" can be considered as HFP AG.
|
||||
if (!ContainsIcon(devicePropertiesArray)) {
|
||||
if (FindProperty(devicePropertiesArray, "Icon") < 0) {
|
||||
for (uint32_t j = 0; j < devicePropertiesArray.Length(); ++j) {
|
||||
BluetoothNamedValue& deviceProperty = devicePropertiesArray[j];
|
||||
if (deviceProperty.name().EqualsLiteral("Class")) {
|
||||
|
@ -2702,6 +2707,40 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
// Check whether the properties array contains CoD. If it doesn't, fallback to restore
|
||||
// CoD value. This usually happens due to NFC directly triggers pairing that
|
||||
// makes bluez not update CoD value.
|
||||
if (FindProperty(devicePropertiesArray, "Class") < 0) {
|
||||
uint32_t cod = 0;
|
||||
int uuidIndex = FindProperty(devicePropertiesArray, "UUIDs");
|
||||
if (uuidIndex >= 0) {
|
||||
BluetoothNamedValue& deviceProperty = devicePropertiesArray[uuidIndex];
|
||||
const InfallibleTArray<nsString>& uuids =
|
||||
deviceProperty.value().get_ArrayOfnsString();
|
||||
|
||||
for (uint32_t i = 0; i < uuids.Length(); ++i) {
|
||||
BluetoothServiceClass serviceClass =
|
||||
BluetoothUuidHelper::GetBluetoothServiceClass(uuids[i]);
|
||||
if (serviceClass == BluetoothServiceClass::HANDSFREE ||
|
||||
serviceClass == BluetoothServiceClass::HEADSET) {
|
||||
BT_LOGD("Restore CoD value, set Audio bit");
|
||||
SET_AUDIO_BIT(cod);
|
||||
} else if (serviceClass == BluetoothServiceClass::A2DP_SINK) {
|
||||
BT_LOGD("Restore CoD value, set A2DP_SINK bit");
|
||||
SET_RENDERING_BIT(cod);
|
||||
}
|
||||
}
|
||||
|
||||
// Add both CoD and Icon information anyway, 'audio-card' refers to
|
||||
// 'Audio' device.
|
||||
devicePropertiesArray.AppendElement(
|
||||
BluetoothNamedValue(NS_LITERAL_STRING("Class"), cod));
|
||||
devicePropertiesArray.AppendElement(
|
||||
BluetoothNamedValue(NS_LITERAL_STRING("Icon"),
|
||||
NS_LITERAL_STRING("audio-card")));
|
||||
}
|
||||
}
|
||||
|
||||
if (mFilterFunc(deviceProperties)) {
|
||||
mValues.get_ArrayOfBluetoothNamedValue().AppendElement(
|
||||
BluetoothNamedValue(mDeviceAddresses[i], deviceProperties));
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
#include "nsLayoutStylesheetCache.h"
|
||||
#include "nsIJSRuntimeService.h"
|
||||
#include "nsThreadManager.h"
|
||||
#include "nsAnonymousTemporaryFile.h"
|
||||
|
||||
#include "IHistory.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "nsAnonymousTemporaryFile.h"
|
||||
#include "nsAppRunner.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCDefaultURIFixup.h"
|
||||
|
@ -118,6 +119,8 @@
|
|||
#include "nsIDocShell.h"
|
||||
#include "mozilla/net/NeckoMessageUtils.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "prio.h"
|
||||
#include "private/pprio.h"
|
||||
|
||||
#if defined(ANDROID) || defined(LINUX)
|
||||
#include "nsSystemInfo.h"
|
||||
|
@ -3655,6 +3658,21 @@ ContentParent::RecvBackUpXResources(const FileDescriptor& aXSocketFd)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ContentParent::RecvOpenAnonymousTemporaryFile(FileDescriptor *aFD)
|
||||
{
|
||||
PRFileDesc *prfd;
|
||||
nsresult rv = NS_OpenAnonymousTemporaryFile(&prfd);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return false;
|
||||
}
|
||||
*aFD = FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(prfd));
|
||||
// The FileDescriptor object owns a duplicate of the file handle; we
|
||||
// must close the original (and clean up the NSPR descriptor).
|
||||
PR_Close(prfd);
|
||||
return true;
|
||||
}
|
||||
|
||||
PFileDescriptorSetParent*
|
||||
ContentParent::AllocPFileDescriptorSetParent(const FileDescriptor& aFD)
|
||||
{
|
||||
|
|
|
@ -610,6 +610,9 @@ private:
|
|||
virtual bool
|
||||
RecvBackUpXResources(const FileDescriptor& aXSocketFd) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool
|
||||
RecvOpenAnonymousTemporaryFile(FileDescriptor* aFD) MOZ_OVERRIDE;
|
||||
|
||||
virtual PFileDescriptorSetParent*
|
||||
AllocPFileDescriptorSetParent(const mozilla::ipc::FileDescriptor&) MOZ_OVERRIDE;
|
||||
|
||||
|
|
|
@ -646,6 +646,8 @@ parent:
|
|||
*/
|
||||
BackUpXResources(FileDescriptor aXSocketFd);
|
||||
|
||||
sync OpenAnonymousTemporaryFile() returns (FileDescriptor aFD);
|
||||
|
||||
both:
|
||||
AsyncMessage(nsString aMessage, ClonedMessageData aData,
|
||||
CpowEntry[] aCpows, Principal aPrincipal);
|
||||
|
|
|
@ -2247,6 +2247,7 @@ compareVariants(NPP instance, const NPVariant* var1, const NPVariant* var2)
|
|||
NPN_ReleaseVariantValue(&resultVariant);
|
||||
}
|
||||
}
|
||||
NPN_MemFree(identifiers);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -84,8 +84,10 @@ public:
|
|||
NS_IMETHODIMP
|
||||
NotifyDialSuccess(uint32_t aCallIndex)
|
||||
{
|
||||
nsRefPtr<TelephonyCallId> id = mTelephony->CreateCallId(mNumber);
|
||||
nsRefPtr<TelephonyCall> call =
|
||||
mTelephony->CreateNewDialingCall(mServiceId, mNumber, aCallIndex);
|
||||
mTelephony->CreateCall(id, mServiceId, aCallIndex,
|
||||
nsITelephonyService::CALL_STATE_DIALING);
|
||||
|
||||
mPromise->MaybeResolve(call);
|
||||
return NS_OK;
|
||||
|
@ -240,7 +242,7 @@ Telephony::HasDialingCall()
|
|||
|
||||
already_AddRefed<Promise>
|
||||
Telephony::DialInternal(uint32_t aServiceId, const nsAString& aNumber,
|
||||
bool aIsEmergency)
|
||||
bool aEmergency)
|
||||
{
|
||||
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(GetOwner());
|
||||
if (!global) {
|
||||
|
@ -262,7 +264,7 @@ Telephony::DialInternal(uint32_t aServiceId, const nsAString& aNumber,
|
|||
|
||||
nsCOMPtr<nsITelephonyCallback> callback =
|
||||
new Callback(this, promise, aServiceId, aNumber);
|
||||
nsresult rv = mService->Dial(aServiceId, aNumber, aIsEmergency, callback);
|
||||
nsresult rv = mService->Dial(aServiceId, aNumber, aEmergency, callback);
|
||||
if (NS_FAILED(rv)) {
|
||||
promise->MaybeReject(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return promise.forget();
|
||||
|
@ -271,19 +273,36 @@ Telephony::DialInternal(uint32_t aServiceId, const nsAString& aNumber,
|
|||
return promise.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<TelephonyCall>
|
||||
Telephony::CreateNewDialingCall(uint32_t aServiceId, const nsAString& aNumber,
|
||||
uint32_t aCallIndex)
|
||||
already_AddRefed<TelephonyCallId>
|
||||
Telephony::CreateCallId(const nsAString& aNumber, uint16_t aNumberPresentation,
|
||||
const nsAString& aName, uint16_t aNamePresentation)
|
||||
{
|
||||
nsRefPtr<TelephonyCall> call =
|
||||
TelephonyCall::Create(this, aServiceId, aNumber,
|
||||
nsITelephonyService::CALL_PRESENTATION_ALLOWED,
|
||||
EmptyString(),
|
||||
nsITelephonyService::CALL_PRESENTATION_ALLOWED,
|
||||
nsITelephonyService::CALL_STATE_DIALING, aCallIndex);
|
||||
NS_ASSERTION(call, "This should never fail!");
|
||||
nsRefPtr<TelephonyCallId> id =
|
||||
new TelephonyCallId(GetOwner(), aNumber, aNumberPresentation,
|
||||
aName, aNamePresentation);
|
||||
|
||||
NS_ASSERTION(mCalls.Contains(call), "Should have auto-added new call!");
|
||||
return id.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<TelephonyCall>
|
||||
Telephony::CreateCall(TelephonyCallId* aId, uint32_t aServiceId,
|
||||
uint32_t aCallIndex, uint16_t aCallState,
|
||||
bool aEmergency, bool aConference,
|
||||
bool aSwitchable, bool aMergeable)
|
||||
{
|
||||
// We don't have to create an already ended call.
|
||||
if (aCallState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsRefPtr<TelephonyCall> call =
|
||||
TelephonyCall::Create(this, aId, aServiceId, aCallIndex, aCallState,
|
||||
aEmergency, aConference, aSwitchable, aMergeable);
|
||||
|
||||
NS_ASSERTION(call, "This should never fail!");
|
||||
NS_ASSERTION(aConference ? mGroup->CallsArray().Contains(call)
|
||||
: mCalls.Contains(call),
|
||||
"Should have auto-added new call!");
|
||||
|
||||
return call.forget();
|
||||
}
|
||||
|
@ -518,25 +537,13 @@ Telephony::CallStateChanged(uint32_t aServiceId, uint32_t aCallIndex,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// Do nothing since we didn't know anything about it before now and it's
|
||||
// ended already.
|
||||
if (aCallState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Didn't find this call in mCalls or mGroup. Create a new call.
|
||||
nsRefPtr<TelephonyCallId> id = CreateCallId(aNumber, aNumberPresentation,
|
||||
aName, aNamePresentation);
|
||||
nsRefPtr<TelephonyCall> call =
|
||||
TelephonyCall::Create(this, aServiceId, aNumber, aNumberPresentation,
|
||||
aName, aNamePresentation, aCallState, aCallIndex,
|
||||
aIsEmergency, aIsConference, aIsSwitchable,
|
||||
aIsMergeable);
|
||||
NS_ASSERTION(call, "This should never fail!");
|
||||
CreateCall(id, aServiceId, aCallIndex, aCallState,
|
||||
aIsEmergency, aIsConference, aIsSwitchable, aIsMergeable);
|
||||
|
||||
NS_ASSERTION(aIsConference ? mGroup->CallsArray().Contains(call) :
|
||||
mCalls.Contains(call),
|
||||
"Should have auto-added new call!");
|
||||
|
||||
if (aCallState == nsITelephonyService::CALL_STATE_INCOMING) {
|
||||
if (call && aCallState == nsITelephonyService::CALL_STATE_INCOMING) {
|
||||
nsresult rv = DispatchCallEvent(NS_LITERAL_STRING("incoming"), call);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
@ -576,28 +583,21 @@ Telephony::EnumerateCallState(uint32_t aServiceId, uint32_t aCallIndex,
|
|||
bool aIsEmergency, bool aIsConference,
|
||||
bool aIsSwitchable, bool aIsMergeable)
|
||||
{
|
||||
nsRefPtr<TelephonyCall> call;
|
||||
|
||||
// We request calls enumeration in constructor, and the asynchronous result
|
||||
// will be sent back through the callback function EnumerateCallState().
|
||||
// However, it is likely to have call state changes, i.e. CallStateChanged()
|
||||
// being called, before the enumeration result comes back. We'd make sure
|
||||
// we don't somehow add duplicates due to the race condition.
|
||||
call = GetCallFromEverywhere(aServiceId, aCallIndex);
|
||||
nsRefPtr<TelephonyCall> call = GetCallFromEverywhere(aServiceId, aCallIndex);
|
||||
if (call) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Didn't know anything about this call before now.
|
||||
call = TelephonyCall::Create(this, aServiceId, aNumber, aNumberPresentation,
|
||||
aName, aNamePresentation, aCallState,
|
||||
aCallIndex, aIsEmergency, aIsConference,
|
||||
aIsSwitchable, aIsMergeable);
|
||||
NS_ASSERTION(call, "This should never fail!");
|
||||
|
||||
NS_ASSERTION(aIsConference ? mGroup->CallsArray().Contains(call) :
|
||||
mCalls.Contains(call),
|
||||
"Should have auto-added new call!");
|
||||
nsRefPtr<TelephonyCallId> id = CreateCallId(aNumber, aNumberPresentation,
|
||||
aName, aNamePresentation);
|
||||
CreateCall(id, aServiceId, aCallIndex, aCallState,
|
||||
aIsEmergency, aIsConference, aIsSwitchable, aIsMergeable);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -167,11 +167,19 @@ private:
|
|||
HasDialingCall();
|
||||
|
||||
already_AddRefed<Promise>
|
||||
DialInternal(uint32_t aServiceId, const nsAString& aNumber, bool isEmergency);
|
||||
DialInternal(uint32_t aServiceId, const nsAString& aNumber, bool aEmergency);
|
||||
|
||||
already_AddRefed<TelephonyCallId>
|
||||
CreateCallId(const nsAString& aNumber,
|
||||
uint16_t aNumberPresentation = nsITelephonyService::CALL_PRESENTATION_ALLOWED,
|
||||
const nsAString& aName = EmptyString(),
|
||||
uint16_t aNamePresentation = nsITelephonyService::CALL_PRESENTATION_ALLOWED);
|
||||
|
||||
already_AddRefed<TelephonyCall>
|
||||
CreateNewDialingCall(uint32_t aServiceId, const nsAString& aNumber,
|
||||
uint32_t aCallIndex);
|
||||
CreateCall(TelephonyCallId* aId,
|
||||
uint32_t aServiceId, uint32_t aCallIndex, uint16_t aCallState,
|
||||
bool aEmergency = false, bool aConference = false,
|
||||
bool aSwitchable = true, bool aMergeable = true);
|
||||
|
||||
nsresult
|
||||
NotifyCallsChanged(TelephonyCall* aCall);
|
||||
|
@ -185,9 +193,6 @@ private:
|
|||
already_AddRefed<TelephonyCall>
|
||||
GetCall(uint32_t aServiceId, uint32_t aCallIndex);
|
||||
|
||||
already_AddRefed<TelephonyCall>
|
||||
GetOutgoingCall();
|
||||
|
||||
already_AddRefed<TelephonyCall>
|
||||
GetCallFromEverywhere(uint32_t aServiceId, uint32_t aCallIndex);
|
||||
};
|
||||
|
|
|
@ -18,30 +18,26 @@ using mozilla::ErrorResult;
|
|||
|
||||
// static
|
||||
already_AddRefed<TelephonyCall>
|
||||
TelephonyCall::Create(Telephony* aTelephony, uint32_t aServiceId,
|
||||
const nsAString& aNumber, uint16_t aNumberPresentation,
|
||||
const nsAString& aName, uint16_t aNamePresentation,
|
||||
uint16_t aCallState, uint32_t aCallIndex, bool aEmergency,
|
||||
bool aIsConference, bool aSwitchable, bool aMergeable)
|
||||
TelephonyCall::Create(Telephony* aTelephony, TelephonyCallId* aId,
|
||||
uint32_t aServiceId, uint32_t aCallIndex,
|
||||
uint16_t aCallState, bool aEmergency, bool aConference,
|
||||
bool aSwitchable, bool aMergeable)
|
||||
{
|
||||
NS_ASSERTION(aTelephony, "Null pointer!");
|
||||
NS_ASSERTION(!aNumber.IsEmpty(), "Empty number!");
|
||||
NS_ASSERTION(aTelephony, "Null aTelephony pointer!");
|
||||
NS_ASSERTION(aId, "Null aId pointer!");
|
||||
NS_ASSERTION(aCallIndex >= 1, "Invalid call index!");
|
||||
|
||||
nsRefPtr<TelephonyCall> call = new TelephonyCall(aTelephony->GetOwner());
|
||||
nsRefPtr<TelephonyCallId> id = new TelephonyCallId(aTelephony->GetOwner(),
|
||||
aNumber, aNumberPresentation,
|
||||
aName, aNamePresentation);
|
||||
|
||||
call->mTelephony = aTelephony;
|
||||
call->mId = aId;
|
||||
call->mServiceId = aServiceId;
|
||||
call->mCallIndex = aCallIndex;
|
||||
call->mError = nullptr;
|
||||
call->mEmergency = aEmergency;
|
||||
call->mGroup = aIsConference ? aTelephony->ConferenceGroup() : nullptr;
|
||||
call->mGroup = aConference ? aTelephony->ConferenceGroup() : nullptr;
|
||||
call->mSwitchable = aSwitchable;
|
||||
call->mMergeable = aMergeable;
|
||||
call->mId = id;
|
||||
call->mError = nullptr;
|
||||
|
||||
call->ChangeStateInternal(aCallState, false);
|
||||
|
||||
|
@ -50,7 +46,6 @@ TelephonyCall::Create(Telephony* aTelephony, uint32_t aServiceId,
|
|||
|
||||
TelephonyCall::TelephonyCall(nsPIDOMWindow* aOwner)
|
||||
: DOMEventTargetHelper(aOwner),
|
||||
mCallState(nsITelephonyService::CALL_STATE_UNKNOWN),
|
||||
mLive(false)
|
||||
{
|
||||
}
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче