зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1094544. Use [Exposed=System] some more instead of hardcoding binding bits in xpc::InitGlobalObject. r=bholley
This commit is contained in:
Родитель
c4cb4d7865
Коммит
59a4947078
|
@ -10,7 +10,8 @@
|
|||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString name, optional DOMString message = "")]
|
||||
[Constructor(DOMString name, optional DOMString message = ""),
|
||||
Exposed=(Window,System)]
|
||||
interface DOMError {
|
||||
[Constant]
|
||||
readonly attribute DOMString name;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
|
||||
Exposed=(Window,Worker)]
|
||||
Exposed=(Window,Worker,System)]
|
||||
interface TextDecoder {
|
||||
[Constant]
|
||||
readonly attribute DOMString encoding;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
[Constructor(optional DOMString utfLabel = "utf-8"),
|
||||
Exposed=(Window,Worker)]
|
||||
Exposed=(Window,Worker,System)]
|
||||
interface TextEncoder {
|
||||
[Constant]
|
||||
readonly attribute DOMString encoding;
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/dom/Exceptions.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/dom/TextDecoderBinding.h"
|
||||
#include "mozilla/dom/TextEncoderBinding.h"
|
||||
#include "mozilla/dom/DOMErrorBinding.h"
|
||||
|
||||
#include "nsDOMMutationObserver.h"
|
||||
#include "nsICycleCollectorListener.h"
|
||||
|
@ -437,17 +434,6 @@ InitGlobalObject(JSContext* aJSContext, JS::Handle<JSObject*> aGlobal, uint32_t
|
|||
// Stuff coming through this path always ends up as a DOM global.
|
||||
MOZ_ASSERT(js::GetObjectClass(aGlobal)->flags & JSCLASS_DOM_GLOBAL);
|
||||
|
||||
// Init WebIDL binding constructors wanted on all XPConnect globals.
|
||||
//
|
||||
// XXX Please do not add any additional classes here without the approval of
|
||||
// the XPConnect module owner.
|
||||
if (!PromiseBinding::GetConstructorObject(aJSContext, aGlobal) ||
|
||||
!TextDecoderBinding::GetConstructorObject(aJSContext, aGlobal) ||
|
||||
!TextEncoderBinding::GetConstructorObject(aJSContext, aGlobal) ||
|
||||
!DOMErrorBinding::GetConstructorObject(aJSContext, aGlobal)) {
|
||||
return UnexpectedFailure(false);
|
||||
}
|
||||
|
||||
if (!(aFlags & nsIXPConnect::DONT_FIRE_ONNEWGLOBALHOOK))
|
||||
JS_FireOnNewGlobalObject(aJSContext, aGlobal);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче