Make Promise::reject_native sound

This commit is contained in:
Anthony Ramine 2017-09-21 16:19:29 +02:00
parent 5addc2dfa3
commit 15acd1525e
4 changed files with 11 additions and 9 deletions

View file

@ -343,7 +343,7 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
// Step 1
if !is_valid_custom_element_name(&name) {
let promise = Promise::new(global_scope);
promise.reject_native(global_scope.get_cx(), &DOMException::new(global_scope, DOMErrorName::SyntaxError));
promise.reject_native(&DOMException::new(global_scope, DOMErrorName::SyntaxError));
return promise
}