summaryrefslogtreecommitdiff
path: root/js/xpconnect/src/XPCWrappedNativeInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect/src/XPCWrappedNativeInfo.cpp')
-rw-r--r--js/xpconnect/src/XPCWrappedNativeInfo.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/js/xpconnect/src/XPCWrappedNativeInfo.cpp b/js/xpconnect/src/XPCWrappedNativeInfo.cpp
index a93b006f0..fe089b511 100644
--- a/js/xpconnect/src/XPCWrappedNativeInfo.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeInfo.cpp
@@ -235,23 +235,6 @@ XPCNativeInterface::NewInstance(nsIInterfaceInfo* aInfo)
bool mainProcessScriptableOnly;
if (NS_FAILED(aInfo->IsMainProcessScriptableOnly(&mainProcessScriptableOnly)))
return nullptr;
- if (mainProcessScriptableOnly && !XRE_IsParentProcess()) {
- nsCOMPtr<nsIConsoleService> console(do_GetService(NS_CONSOLESERVICE_CONTRACTID));
- if (console) {
- const char* intfNameChars;
- aInfo->GetNameShared(&intfNameChars);
- nsPrintfCString errorMsg("Use of %s in content process is deprecated.", intfNameChars);
-
- nsAutoString filename;
- uint32_t lineno = 0, column = 0;
- nsJSUtils::GetCallingLocation(cx, filename, &lineno, &column);
- nsCOMPtr<nsIScriptError> error(do_CreateInstance(NS_SCRIPTERROR_CONTRACTID));
- error->Init(NS_ConvertUTF8toUTF16(errorMsg),
- filename, EmptyString(),
- lineno, column, nsIScriptError::warningFlag, "chrome javascript");
- console->LogMessage(error);
- }
- }
if (NS_FAILED(aInfo->GetMethodCount(&methodCount)) ||
NS_FAILED(aInfo->GetConstantCount(&constCount)))