Commit 27f4fb5a authored by Kris Maglione's avatar Kris Maglione
Browse files

Backed out two changesets (bug 1442931) for Windows build bustage

MozReview-Commit-ID: EAP1dIdvd8g

--HG--
extra : histedit_source : 0848dcd64f0e1cccaf9ce2c5faa08509990cfade%2Cd100c0c3dfca8b92f9cd1fda1b126a0d2f8a47cd
parent 16848050
Loading
Loading
Loading
Loading
+1 −19
Original line number Diff line number Diff line
@@ -18,16 +18,12 @@ class DescriptorProvider:
        pass


def isChildPath(path, basePath):
    return os.path.commonprefix((path, basePath)) == basePath


class Configuration(DescriptorProvider):
    """
    Represents global configuration state based on IDL parse data and
    the configuration file.
    """
    def __init__(self, filename, webRoots, parseData, generatedEvents=[]):
    def __init__(self, filename, parseData, generatedEvents=[]):
        DescriptorProvider.__init__(self)

        # Read the configuration file.
@@ -35,9 +31,6 @@ class Configuration(DescriptorProvider):
        execfile(filename, glbl)
        config = glbl['DOMInterfaces']

        def isInWebIDLRoot(path):
            return any(isChildPath(path, root) for root in webRoots)

        # Build descriptors for all the interfaces we have in the parse data.
        # This allows callers to specify a subset of interfaces by filtering
        # |parseData|.
@@ -101,17 +94,6 @@ class Configuration(DescriptorProvider):
                            "%s\n"
                            "%s" %
                            (partialIface.location, iface.location))
                if not (iface.getExtendedAttribute("ChromeOnly") or
                        not (iface.hasInterfaceObject() or
                             iface.isNavigatorProperty()) or
                        isInWebIDLRoot(iface.filename())):
                    raise TypeError(
                        "Interfaces which are exposed to the web may only be "
                        "defined in a DOM WebIDL root %r. Consider marking "
                        "the interface [ChromeOnly] if you do not want it "
                        "exposed to the web.\n"
                        "%s" %
                        (webRoots, iface.location))
            self.interfaces[iface.identifier.name] = iface
            if iface.identifier.name not in config:
                # Completely skip consequential interfaces with no descriptor
+2 −23
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ class WebIDLCodegenManager(LoggingMixin):
        'PrototypeList.cpp',
    }

    def __init__(self, config_path, webidl_root, inputs, exported_header_dir,
    def __init__(self, config_path, inputs, exported_header_dir,
                 codegen_dir, state_path, cache_dir=None, make_deps_path=None,
                 make_deps_target=None):
        """Create an instance that manages WebIDLs in the build system.
@@ -176,7 +176,6 @@ class WebIDLCodegenManager(LoggingMixin):
        input_paths, exported_stems, generated_events_stems, example_interfaces = inputs

        self._config_path = config_path
        self._webidl_root = webidl_root
        self._input_paths = set(input_paths)
        self._exported_stems = set(exported_stems)
        self._generated_events_stems = set(generated_events_stems)
@@ -333,26 +332,8 @@ class WebIDLCodegenManager(LoggingMixin):
                hashes[path] = hashlib.sha1(data).hexdigest()
                parser.parse(data, path)

        # Only these directories may contain WebIDL files with interfaces
        # which are exposed to the web. WebIDL files in these roots may not
        # be changed without DOM peer review.
        #
        # Other directories may contain WebIDL files as long as they only
        # contain ChromeOnly interfaces. These are not subject to mandatory
        # DOM peer review.
        web_roots = (
            # The main WebIDL root.
            self._webidl_root,
            # The binding config root, which contains some test-only
            # interfaces.
            os.path.dirname(self._config_path),
            # The objdir sub-directory which contains generated WebIDL files.
            self._codegen_dir,
        )

        self._parser_results = parser.finish()
        self._config = Configuration(self._config_path, web_roots,
                                     self._parser_results,
        self._config = Configuration(self._config_path, self._parser_results,
                                     self._generated_events_stems_as_array)
        self._input_hashes = hashes

@@ -565,7 +546,6 @@ def create_build_system_manager(topsrcdir, topobjdir, dist_dir):
    """Create a WebIDLCodegenManager for use by the build system."""
    src_dir = os.path.join(topsrcdir, 'dom', 'bindings')
    obj_dir = os.path.join(topobjdir, 'dom', 'bindings')
    webidl_root = os.path.join(topsrcdir, 'dom', 'webidl')

    with open(os.path.join(obj_dir, 'file-lists.json'), 'rb') as fh:
        files = json.load(fh)
@@ -582,7 +562,6 @@ def create_build_system_manager(topsrcdir, topobjdir, dist_dir):

    return WebIDLCodegenManager(
        os.path.join(src_dir, 'Bindings.conf'),
        webidl_root,
        inputs,
        os.path.join(dist_dir, 'include', 'mozilla', 'dom'),
        obj_dir,

dom/chrome-webidl/moz.build

deleted100644 → 0
+0 −47
Original line number Diff line number Diff line
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

with Files("**"):
    BUG_COMPONENT = ("Core", "DOM")

with Files("ChannelWrapper.webidl"):
    BUG_COMPONENT = ("Toolkit", "WebExtensions: Request Handling")

with Files("HeapSnapshot.webidl"):
    BUG_COMPONENT = ("Firefox", "Developer Tools: Memory")

with Files("InspectorUtils.webidl"):
    BUG_COMPONENT = ("Firefox", "Developer Tools: Inspector")

with Files("MatchGlob.webidl"):
    BUG_COMPONENT = ("Toolkit", "WebExtensions: General")

with Files("MatchPattern.webidl"):
    BUG_COMPONENT = ("Toolkit", "WebExtensions: General")

with Files("WebExtension*.webidl"):
    BUG_COMPONENT = ("Toolkit", "WebExtensions: General")

PREPROCESSED_WEBIDL_FILES = [
    'ChromeUtils.webidl',
]

WEBIDL_FILES = [
    'ChannelWrapper.webidl',
    'DominatorTree.webidl',
    'HeapSnapshot.webidl',
    'InspectorUtils.webidl',
    'MatchGlob.webidl',
    'MatchPattern.webidl',
    'MozStorageAsyncStatementParams.webidl',
    'MozStorageStatementParams.webidl',
    'MozStorageStatementRow.webidl',
    'PrecompiledScript.webidl',
    'PromiseDebugging.webidl',
    'StructuredCloneHolder.webidl',
    'WebExtensionContentScript.webidl',
    'WebExtensionPolicy.webidl',
]
+0 −1
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ DIRS += [
    'browser-element',
    'cache',
    'canvas',
    'chrome-webidl',
    'clients',
    'commandhandler',
    'credentialmanagement',
Loading