Bug 1455674 part 18. Add Element to importGlobalProperties. r=qdot
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 26 Apr 2018 23:37:34 -0400
changeset 472098 c29505c32af15fec6c054b3ffe767664feb05c83
parent 472097 f4428b451bbaae9f9f6810a91e6e7b0c03e9d467
child 472099 c75434fd510099f93604cd97f1fc9b84f920f314
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1455674
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1455674 part 18. Add Element to importGlobalProperties. r=qdot
js/xpconnect/src/Sandbox.cpp
js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/Sandbox.cpp
+++ b/js/xpconnect/src/Sandbox.cpp
@@ -31,16 +31,17 @@
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/BlobBinding.h"
 #include "mozilla/dom/cache/CacheStorage.h"
 #include "mozilla/dom/CSSBinding.h"
 #include "mozilla/dom/CSSRuleBinding.h"
 #include "mozilla/dom/DirectoryBinding.h"
 #include "mozilla/dom/DOMParserBinding.h"
 #include "mozilla/dom/DOMPrefs.h"
+#include "mozilla/dom/ElementBinding.h"
 #include "mozilla/dom/EventBinding.h"
 #include "mozilla/dom/IndexedDatabaseManager.h"
 #include "mozilla/dom/Fetch.h"
 #include "mozilla/dom/FileBinding.h"
 #include "mozilla/dom/InspectorUtilsBinding.h"
 #include "mozilla/dom/MessageChannelBinding.h"
 #include "mozilla/dom/MessagePortBinding.h"
 #include "mozilla/dom/NodeFilterBinding.h"
@@ -810,16 +811,18 @@ xpc::GlobalProperties::Parse(JSContext* 
         } else if (!strcmp(name.ptr(), "CSS")) {
             CSS = true;
         } else if (!strcmp(name.ptr(), "CSSRule")) {
             CSSRule = true;
         } else if (!strcmp(name.ptr(), "Directory")) {
             Directory = true;
         } else if (!strcmp(name.ptr(), "DOMParser")) {
             DOMParser = true;
+        } else if (!strcmp(name.ptr(), "Element")) {
+            Element = true;
         } else if (!strcmp(name.ptr(), "Event")) {
             Event = true;
         } else if (!strcmp(name.ptr(), "File")) {
             File = true;
         } else if (!strcmp(name.ptr(), "FileReader")) {
             FileReader = true;
         } else if (!strcmp(name.ptr(), "FormData")) {
             FormData = true;
@@ -890,16 +893,20 @@ xpc::GlobalProperties::Define(JSContext*
     if (Directory &&
         !dom::DirectoryBinding::GetConstructorObject(cx))
         return false;
 
     if (DOMParser &&
         !dom::DOMParserBinding::GetConstructorObject(cx))
         return false;
 
+    if (Element &&
+        !dom::ElementBinding::GetConstructorObject(cx))
+        return false;
+
     if (Event &&
         !dom::EventBinding::GetConstructorObject(cx))
         return false;
 
     if (File &&
         !dom::FileBinding::GetConstructorObject(cx))
         return false;
 
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -2610,16 +2610,17 @@ struct GlobalProperties {
 
     // Interface objects we can expose.
     bool Blob : 1;
     bool ChromeUtils : 1;
     bool CSS : 1;
     bool CSSRule : 1;
     bool Directory : 1;
     bool DOMParser : 1;
+    bool Element : 1;
     bool Event : 1;
     bool File : 1;
     bool FileReader: 1;
     bool FormData : 1;
     bool InspectorUtils : 1;
     bool MessageChannel: 1;
     bool NodeFilter : 1;
     bool TextDecoder : 1;