gecko-dev/dom/bindings
Emilio Cobos Álvarez 9e02f38a2e Bug 1766909 - Wrap ObservableArray proxy on getter, rather than throwing. r=peterv
This will still prevent them from accessing stuff (.length will be
undefined, etc), but seems better than unexpectedly throwing. This fixes
the issue at hand at least.

With this patch, we reject length accesses here:

  https://searchfox.org/mozilla-central/rev/86c98c486f03b598d0f80356b69163fd400ec8aa/js/xpconnect/wrappers/XrayWrapper.cpp#229-233

Your call on whether this patch is enough as-is, or more work is needed.
Also your call on whether if more work is needed that needs to happen on
this bug or somewhere else.

I'm not sure what we'd need to do to support this more "properly",
presumably we'd need to add special XRay support to
ObservableArrayProxyHandler or so? Pointers (or patches of course ;))
welcome.

Also unsure about the setter situation, I _think_ it's fine not to throw
given the code I read, but please sanity-check.

Differential Revision: https://phabricator.services.mozilla.com/D145045
2022-05-12 07:36:03 +00:00
..
crashtests
docs
mozwebidlcodegen Bug 1757241 - Remove special case handling for ReadableStream in WebIDL generator r=edgar 2022-04-13 18:57:49 +00:00
parser Bug 1757241 - Remove special case handling for ReadableStream in WebIDL generator r=edgar 2022-04-13 18:57:49 +00:00
test Bug 1766909 - Wrap ObservableArray proxy on getter, rather than throwing. r=peterv 2022-05-12 07:36:03 +00:00
AtomList.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
BindingCallContext.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
BindingDeclarations.h Bug 1732696 - Improve CustomElementDefinition cycle collection code. r=smaug 2021-12-20 10:01:11 +00:00
BindingIPCUtils.h Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
BindingUtils.cpp Bug 1766909 - Wrap ObservableArray proxy on getter, rather than throwing. r=peterv 2022-05-12 07:36:03 +00:00
BindingUtils.h Bug 1766909 - Wrap ObservableArray proxy on getter, rather than throwing. r=peterv 2022-05-12 07:36:03 +00:00
Bindings.conf Bug 1586109: Move RTCRtpTransceiver to c++. r=mjf,emilio 2022-05-10 18:07:19 +00:00
CallbackFunction.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
CallbackInterface.cpp Bug 1754405 part 1 - Remove JSID_IS_STRING/JSID_TO_STRING. r=evilpie 2022-02-10 09:13:17 +00:00
CallbackInterface.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
CallbackObject.cpp
CallbackObject.h Bug 1726123 - Part 5: Add missing "js/" includes outside of SM. r=arai 2021-08-17 15:45:39 +00:00
Codegen.py Bug 1766909 - Wrap ObservableArray proxy on getter, rather than throwing. r=peterv 2022-05-12 07:36:03 +00:00
Configuration.py Bug 1750442 - Merge the string table for WebIDL prototypes and the WebIDL global name hash. r=farre 2022-02-14 11:41:54 +00:00
DOMExceptionNames.h Bug 1718353: Remove InvalidPointerId from DOM4ErrorTypeCodeMap r=saschanaz 2021-11-11 21:07:55 +00:00
DOMJSClass.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
DOMJSProxyHandler.cpp Bug 1754405 part 8 - Rename JSID_VOID to PropertyKey::Void(). r=evilpie 2022-02-13 12:01:46 +00:00
DOMJSProxyHandler.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
DOMString.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
ErrorIPCUtils.h Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8 2022-03-04 15:39:41 +00:00
ErrorResult.h Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8 2022-03-04 15:39:41 +00:00
Errors.msg Bug 1736564 - Create a common error message for conversion error; r=peterv 2021-10-20 08:27:55 +00:00
Exceptions.cpp
Exceptions.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
FakeString.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
GenerateCSS2PropertiesWebIDL.py Bug 1738663 - Remove unneeded special-case for backdrop-filter in GenerateCSS2PropertiesWebIDL. r=layout-reviewers,mats 2021-11-02 14:22:08 +00:00
IterableIterator.cpp
IterableIterator.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
JSSlots.h Bug 1766909 - Wrap ObservableArray proxy on getter, rather than throwing. r=peterv 2022-05-12 07:36:03 +00:00
Makefile.in
NonRefcountedDOMObject.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
Nullable.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
ObservableArrayProxyHandler.cpp Bug 1683281 - Part 3: Add ObservableArrayProxyHandler base class; r=peterv 2022-03-10 22:44:27 +00:00
ObservableArrayProxyHandler.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
PinnedStringId.h Bug 1754405 part 8 - Rename JSID_VOID to PropertyKey::Void(). r=evilpie 2022-02-13 12:01:46 +00:00
PrimitiveConversions.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
ProxyHandlerUtils.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
Record.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
RemoteObjectProxy.cpp Bug 1719998 - Don't use lookupForAdd in GetOrCreateProxyObject. r=peterv,jonco 2021-07-20 23:42:00 +00:00
RemoteObjectProxy.h Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi 2022-05-09 20:41:05 +00:00
RootedDictionary.h Bug 1768189 - Part 6: Apply modernize-concat-nested-namespaces to dom/bindings/RootedDictionary.h ... r=andi 2022-05-09 20:41:05 +00:00
RootedOwningNonNull.h
RootedRefPtr.h
SimpleGlobalObject.cpp Bug 1270746 part 5 - Remove hasInstance class hook. r=iain 2022-03-20 11:28:04 +00:00
SimpleGlobalObject.h Bug 1759163 - Add origin trial support for worklets. r=asuth 2022-03-15 23:16:14 +00:00
SpiderMonkeyInterface.h Bug 1768189 - Part 6: Apply modernize-concat-nested-namespaces to dom/bindings/RootedDictionary.h ... r=andi 2022-05-09 20:41:05 +00:00
ToJSValue.cpp Bug 1682121 - Add a ToJSValue overload for nsACString. r=hsivonen 2020-12-14 11:12:11 +00:00
ToJSValue.h Bug 1768189 - Part 6: Apply modernize-concat-nested-namespaces to dom/bindings/RootedDictionary.h ... r=andi 2022-05-09 20:41:05 +00:00
TypedArray.h Bug 1768189 - Part 6: Apply modernize-concat-nested-namespaces to dom/bindings/RootedDictionary.h ... r=andi 2022-05-09 20:41:05 +00:00
UnionMember.h Bug 1768189 - Part 6: Apply modernize-concat-nested-namespaces to dom/bindings/RootedDictionary.h ... r=andi 2022-05-09 20:41:05 +00:00
WebIDLGlobalNameHash.cpp Bug 1683281 - Part 2: Move proxy handler utility functions from DOMJSProxyHandler.h to ProxyHandlerUtils.h; r=peterv 2022-03-10 22:44:27 +00:00
WebIDLGlobalNameHash.h Bug 1768189 - Part 6: Apply modernize-concat-nested-namespaces to dom/bindings/RootedDictionary.h ... r=andi 2022-05-09 20:41:05 +00:00
XrayExpandoClass.h Bug 1768189 - Part 6: Apply modernize-concat-nested-namespaces to dom/bindings/RootedDictionary.h ... r=andi 2022-05-09 20:41:05 +00:00
mach_commands.py Bug 1734523 - Remove the use of MozbuildObject.mozconfig in mozwebidlcodegen. r=firefox-build-system-reviewers,mhentges 2021-10-07 15:19:03 +00:00
moz.build Bug 1757241 - Remove !MOZ_DOM_STREAMS code from most files r=smaug 2022-04-13 18:57:48 +00:00
nsIScriptError.idl Bug 1696856 - [devtools] Move isForwardedFromContentProcess to nsConsoleMessage. r=baku. 2021-03-10 12:44:22 +00:00
nsScriptError.cpp
nsScriptError.h
nsScriptErrorWithStack.cpp