зеркало из https://github.com/mozilla/gecko-dev.git
Bug 946564 part 1. Allow installing chromeonly webidl quickstubs too. r=peterv
This commit is contained in:
Родитель
3d798ddba9
Коммит
c57a4a55e3
|
@ -7,6 +7,7 @@
|
|||
#include "jsfriendapi.h"
|
||||
#include "jsprf.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "AccessCheck.h"
|
||||
#include "WrapperFactory.h"
|
||||
#include "xpcprivate.h"
|
||||
#include "XPCInlines.h"
|
||||
|
@ -140,7 +141,13 @@ xpc_qsDefineQuickStubs(JSContext *cx, JSObject *protoArg, unsigned flags,
|
|||
}
|
||||
|
||||
if (entry->newBindingProperties) {
|
||||
mozilla::dom::DefineWebIDLBindingPropertiesOnXPCObject(cx, proto, entry->newBindingProperties, false);
|
||||
if (entry->newBindingProperties->regular) {
|
||||
mozilla::dom::DefineWebIDLBindingPropertiesOnXPCObject(cx, proto, entry->newBindingProperties->regular, false);
|
||||
}
|
||||
if (entry->newBindingProperties->chromeOnly &&
|
||||
xpc::AccessCheck::isChrome(js::GetContextCompartment(cx))) {
|
||||
mozilla::dom::DefineWebIDLBindingPropertiesOnXPCObject(cx, proto, entry->newBindingProperties->chromeOnly, false);
|
||||
}
|
||||
}
|
||||
// Next.
|
||||
size_t j = entry->parentInterface;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
class qsObjectHelper;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class NativeProperties;
|
||||
class NativePropertiesHolder;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ struct xpc_qsHashEntry {
|
|||
uint16_t n_props;
|
||||
uint16_t func_index;
|
||||
uint16_t n_funcs;
|
||||
const mozilla::dom::NativeProperties* newBindingProperties;
|
||||
const mozilla::dom::NativePropertiesHolder* newBindingProperties;
|
||||
// These last two fields index to other entries in the same table.
|
||||
// XPC_QS_NULL_ENTRY indicates there are no more entries in the chain.
|
||||
uint16_t parentInterface;
|
||||
|
|
|
@ -111,6 +111,6 @@ customMethodCalls = {
|
|||
newBindingProperties = {
|
||||
# Once the last entry here goes away, we can make the sNativePropertyHooks
|
||||
# of bindings static.
|
||||
'nsIDOMEventTarget': 'mozilla::dom::EventTargetBinding::sNativePropertyHooks->mNativeProperties.regular',
|
||||
'nsIDOMWindow': 'mozilla::dom::WindowBinding::sNativePropertyHooks->mNativeProperties.regular',
|
||||
'nsIDOMEventTarget': '&mozilla::dom::EventTargetBinding::sNativePropertyHooks->mNativeProperties',
|
||||
'nsIDOMWindow': '&mozilla::dom::WindowBinding::sNativePropertyHooks->mNativeProperties',
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче