diff options
author | JustOff <Off.Just.Off@gmail.com> | 2019-03-13 21:44:49 +0200 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2019-03-13 21:44:49 +0200 |
commit | c00255c355ab32f7b19f21e9797a8fb83827d0be (patch) | |
tree | 55f8376de440497b111a68d23d18b550894c8f9f /dom | |
parent | cd0e94ceb1031a76dc8e9f70bb9cdab691fb8866 (diff) | |
download | UXP-c00255c355ab32f7b19f21e9797a8fb83827d0be.tar UXP-c00255c355ab32f7b19f21e9797a8fb83827d0be.tar.gz UXP-c00255c355ab32f7b19f21e9797a8fb83827d0be.tar.lz UXP-c00255c355ab32f7b19f21e9797a8fb83827d0be.tar.xz UXP-c00255c355ab32f7b19f21e9797a8fb83827d0be.zip |
Align IDL record to C++ conversion with the spec when Symbol-named properties are involved
Diffstat (limited to 'dom')
-rw-r--r-- | dom/bindings/Codegen.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index e32d16a48..74acb5918 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -4808,10 +4808,8 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, JS::Rooted<JSObject*> recordObj(cx, &$${val}.toObject()); JS::AutoIdVector ids(cx); - // Keep skipping symbols until - // https://github.com/heycam/webidl/issues/294 is sorted out. if (!js::GetPropertyKeys(cx, recordObj, - JSITER_OWNONLY | JSITER_HIDDEN, &ids)) { + JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, &ids)) { $*{exceptionCode} } if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) { @@ -4831,8 +4829,6 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, for (size_t i = 0; i < ids.length(); ++i) { curId = ids[i]; - MOZ_ASSERT(!JSID_IS_SYMBOL(curId), "No symbols, we said!"); - JS::Rooted<JS::PropertyDescriptor> desc(cx); if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId, &desc)) { @@ -4846,6 +4842,8 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, idVal = js::IdToValue(curId); ${keyType} propName; + // This will just throw if idVal is a Symbol, like the spec says + // to do. if (!${keyConversionFunction}(cx, idVal, propName)) { $*{exceptionCode} } |