mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1335654 part 4. Fix some CrossOriginXrayWrapper error reporting bits to follow the HTML spec for cross-origin objects. r=bholley
This commit is contained in:
parent
bcc1d4ab44
commit
0041276515
@ -8,6 +8,8 @@
|
||||
#include "AccessCheck.h"
|
||||
#include "ChromeObjectWrapper.h"
|
||||
#include "XrayWrapper.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
|
||||
@ -287,7 +289,7 @@ CrossOriginXrayWrapper::defineProperty(JSContext* cx, JS::Handle<JSObject*> wrap
|
||||
JS::Handle<PropertyDescriptor> desc,
|
||||
JS::ObjectOpResult& result) const
|
||||
{
|
||||
JS_ReportErrorASCII(cx, "Permission denied to define property on cross-origin object");
|
||||
AccessCheck::reportCrossOriginDenial(cx, id, NS_LITERAL_CSTRING("define"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -295,7 +297,7 @@ bool
|
||||
CrossOriginXrayWrapper::delete_(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<jsid> id, JS::ObjectOpResult& result) const
|
||||
{
|
||||
JS_ReportErrorASCII(cx, "Permission denied to delete property on cross-origin object");
|
||||
AccessCheck::reportCrossOriginDenial(cx, id, NS_LITERAL_CSTRING("delete"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -6,12 +6,6 @@
|
||||
[[[SetPrototypeOf\]\] should throw]
|
||||
expected: FAIL
|
||||
|
||||
[[[Delete\]\] Should throw on cross-origin objects]
|
||||
expected: FAIL
|
||||
|
||||
[[[DefineOwnProperty\]\] Should throw for cross-origin objects]
|
||||
expected: FAIL
|
||||
|
||||
[[[OwnPropertyKeys\]\] should return all properties from cross-origin objects]
|
||||
expected: FAIL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user