dom/xhr/moz.build
author Nicholas Nethercote <nnethercote@mozilla.com>
Fri, 03 Mar 2017 15:32:11 +1100
changeset 374836 4e196d802c7be7f3a3c147cc6c5b6406656584b1
parent 370485 a75a77d1bb99e3238d422572fbf5e8fd102af8bb
permissions -rw-r--r--
Bug 1344118 - Fix the profiler's sleeping threads optimization. r=jseward. When ProfilerBuffer::reset() is called, DuplicateLastSample() will start failing for all sleeping threads because there will be no prior thread data in the buffer to duplicate. But the sampling loop doesn't detect such failure. This causes two problems: - Missing samples. - CPU usage goes through the roof, because each time around the sampling loop the length of the failing search increases. The fix is simple: detect failure in the sampling loop and do a normal sample in that case. The patch also removes ThreadInfo::DuplicateLastSample(), because it just calls onto ProfileBuffer::DuplicateLastSample().

# -*- 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")

XPIDL_SOURCES += [
    'nsIXMLHttpRequest.idl',
]

XPIDL_MODULE = 'dom_xhr'

EXPORTS.mozilla.dom += [
    'XMLHttpRequest.h',
    'XMLHttpRequestEventTarget.h',
    'XMLHttpRequestMainThread.h',
    'XMLHttpRequestString.h',
    'XMLHttpRequestUpload.h',
]

UNIFIED_SOURCES += [
    'XMLHttpRequest.cpp',
    'XMLHttpRequestEventTarget.cpp',
    'XMLHttpRequestMainThread.cpp',
    'XMLHttpRequestString.cpp',
    'XMLHttpRequestUpload.cpp',
    'XMLHttpRequestWorker.cpp',
]

LOCAL_INCLUDES += [
    '/dom/base',
    '/dom/file',
    '/dom/workers',
    '/netwerk/base',
]

MOCHITEST_MANIFESTS += [ 'tests/mochitest.ini' ]

BROWSER_CHROME_MANIFESTS += [ 'tests/browser.ini' ]

include('/ipc/chromium/chromium-config.mozbuild')

FINAL_LIBRARY = 'xul'