Stop building non-generated dom/binding files as UNIFIED_SOURCES.

master
Fedor 2020-03-12 20:42:23 +03:00
parent 052cbebbef
commit 03f2d19bc2
8 changed files with 24 additions and 19 deletions

View File

@ -345,7 +345,6 @@ UNIFIED_SOURCES += [
'nsViewportInfo.cpp',
'nsWindowMemoryReporter.cpp',
'nsWindowRoot.cpp',
'nsWrapperCache.cpp',
'nsXHTMLContentSerializer.cpp',
'nsXMLContentSerializer.cpp',
'nsXMLNameSpaceMap.cpp',
@ -398,6 +397,7 @@ SOURCES += [
'nsObjectLoadingContent.cpp',
# nsPluginArray.cpp includes npapi.h indirectly, and that includes a lot of system headers
'nsPluginArray.cpp',
'nsWrapperCache.cpp',
]
# Are we targeting x86-32 or x86-64? If so, we want to include SSE2 code for

View File

@ -86,7 +86,15 @@ public:
* This getter clears the gray bit before handing out the JSObject which means
* that the object is guaranteed to be kept alive past the next CC.
*/
JSObject* GetWrapper() const;
inline JSObject* GetWrapper() const
{
JSObject* obj = GetWrapperPreserveColor();
if (obj) {
JS::ExposeObjectToActiveJS(obj);
}
return obj;
}
/**
* Get the cached wrapper.

View File

@ -11,16 +11,6 @@
#include "js/GCAPI.h"
#include "js/TracingAPI.h"
inline JSObject*
nsWrapperCache::GetWrapper() const
{
JSObject* obj = GetWrapperPreserveColor();
if (obj) {
JS::ExposeObjectToActiveJS(obj);
}
return obj;
}
inline bool
nsWrapperCache::IsBlack()
{

View File

@ -4,8 +4,12 @@
* 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/. */
#include "jswrapper.h"
#include "WebIDLGlobalNameHash.h"
#include "js/GCAPI.h"
#include "XrayWrapper.h"
#include "XPCWrapper.h"
#include "mozilla/dom/Selection.h"
#include "mozilla/HashFunctions.h"
#include "mozilla/Maybe.h"
#include "mozilla/dom/DOMJSProxyHandler.h"

View File

@ -8,6 +8,7 @@
#define mozilla_dom_WebIDLGlobalNameHash_h__
#include "js/RootingAPI.h"
#include "nsString.h"
#include "nsTArray.h"
namespace mozilla {

View File

@ -89,7 +89,7 @@ LOCAL_INCLUDES += [
'/media/webrtc/signaling/src/peerconnection',
]
UNIFIED_SOURCES += [
SOURCES += [
'BindingUtils.cpp',
'CallbackInterface.cpp',
'CallbackObject.cpp',
@ -100,14 +100,11 @@ UNIFIED_SOURCES += [
'nsScriptError.cpp',
'nsScriptErrorWithStack.cpp',
'SimpleGlobalObject.cpp',
'StructuredClone.cpp',
'ToJSValue.cpp',
'WebIDLGlobalNameHash.cpp',
]
SOURCES += [
'StructuredClone.cpp',
]
# Tests for maplike and setlike require bindings to be built, which means they
# must be included in libxul. This breaks the "no test classes are exported"
# rule stated in the test/ directory, but it's the only way this will work.

View File

@ -14,8 +14,13 @@
#include "jsapi.h"
#include "js/RootingAPI.h"
#include "jswrapper.h"
#include "nsCOMArray.h"
#include "nsContentUtils.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIScriptError.h"
#include "nsString.h"
#include "nsStringFwd.h"
class nsScriptErrorNote final : public nsIScriptErrorNote {
public:

View File

@ -22,7 +22,7 @@ using namespace mozilla::dom;
namespace {
static nsCString
FormatStackString(JSContext* cx, HandleObject aStack) {
FormatStackString(JSContext* cx, JS::HandleObject aStack) {
JS::RootedString formattedStack(cx);
if (!JS::BuildStackString(cx, aStack, &formattedStack)) {
@ -111,7 +111,7 @@ nsScriptErrorWithStack::ToString(nsACString& /*UTF8*/ aResult)
}
JSContext* cx = jsapi.cx();
RootedObject stack(cx, mStack);
JS::RootedObject stack(cx, mStack);
nsCString stackString = FormatStackString(cx, stack);
nsCString combined = message + NS_LITERAL_CSTRING("\n") + stackString;
aResult.Assign(combined);