mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 945416 part 5. Implement nsGlobalWindow::GetOwnPropertyNames and flag the interface as NeedNewResolve. r=peterv
This commit is contained in:
parent
43c7d1c9d4
commit
f2da4794d9
@ -34,6 +34,7 @@
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptTimeoutHandler.h"
|
||||
#include "nsIController.h"
|
||||
#include "nsScriptNameSpaceManager.h"
|
||||
|
||||
// Helper Classes
|
||||
#include "nsJSUtils.h"
|
||||
@ -4071,6 +4072,24 @@ nsGlobalWindow::DoNewResolve(JSContext* aCx, JS::Handle<JSObject*> aObj,
|
||||
return true;
|
||||
}
|
||||
|
||||
static PLDHashOperator
|
||||
EnumerateGlobalName(const nsAString& aName, void* aClosure)
|
||||
{
|
||||
nsTArray<nsString>* arr = static_cast<nsTArray<nsString>*>(aClosure);
|
||||
arr->AppendElement(aName);
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
void
|
||||
nsGlobalWindow::GetOwnPropertyNames(JSContext* aCx, nsTArray<nsString>& aNames,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
nsScriptNameSpaceManager* nameSpaceManager = GetNameSpaceManager();
|
||||
if (nameSpaceManager) {
|
||||
nameSpaceManager->EnumerateGlobalNames(EnumerateGlobalName, &aNames);
|
||||
}
|
||||
}
|
||||
|
||||
nsIDOMOfflineResourceList*
|
||||
nsGlobalWindow::GetApplicationCache(ErrorResult& aError)
|
||||
{
|
||||
|
@ -479,6 +479,9 @@ public:
|
||||
JS::Handle<jsid> aId,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc);
|
||||
|
||||
void GetOwnPropertyNames(JSContext* aCx, nsTArray<nsString>& aNames,
|
||||
mozilla::ErrorResult& aRv);
|
||||
|
||||
// Object Management
|
||||
nsGlobalWindow(nsGlobalWindow *aOuterWindow);
|
||||
|
||||
|
@ -22,7 +22,7 @@ interface Pkcs11;
|
||||
typedef any Transferable;
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/
|
||||
[Global]
|
||||
[Global, NeedNewResolve]
|
||||
/*sealed*/ interface Window : EventTarget {
|
||||
// the current browsing context
|
||||
[Unforgeable, Throws,
|
||||
|
Loading…
Reference in New Issue
Block a user