summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome_frame/np_browser_functions.cc2
-rw-r--r--chrome_frame/np_utils.cc13
2 files changed, 10 insertions, 5 deletions
diff --git a/chrome_frame/np_browser_functions.cc b/chrome_frame/np_browser_functions.cc
index 801d60a..597fde3 100644
--- a/chrome_frame/np_browser_functions.cc
+++ b/chrome_frame/np_browser_functions.cc
@@ -461,7 +461,7 @@ NPError SetValueForURL(NPP instance, NPNURLVariable variable, const char* url,
const char* value, uint32 len) {
DCHECK(IsInitialized()) << __FUNCTION__;
DCHECK(npapi::VersionMinor() >= NPVERS_HAS_URL_AND_AUTH_INFO);
- if (g_setvalueforurl) {
+ if (!g_setvalueforurl) {
NOTREACHED();
return NPERR_INCOMPATIBLE_VERSION_ERROR;
}
diff --git a/chrome_frame/np_utils.cc b/chrome_frame/np_utils.cc
index 2549504..469c8a3 100644
--- a/chrome_frame/np_utils.cc
+++ b/chrome_frame/np_utils.cc
@@ -30,10 +30,15 @@ bool GetXPCOMCookieServiceAndURI(NPP instance, const std::string& url,
DCHECK(uri);
ScopedNsPtr<nsIServiceManager> service_manager;
- NPError nperr = npapi::GetValue(instance, NPNVserviceManager,
- service_manager.Receive());
- if (nperr != NPERR_NO_ERROR || !service_manager.get())
- return false;
+
+ NPError nperr = NS_GetServiceManager(service_manager.Receive());
+ if (nperr != NPERR_NO_ERROR || !service_manager.get()) {
+ NPError nperr = npapi::GetValue(instance, NPNVserviceManager,
+ service_manager.Receive());
+ if (nperr != NPERR_NO_ERROR || !service_manager.get()) {
+ return false;
+ }
+ }
ScopedNsPtr<nsIIOService, &IID_nsIIOService> io_service;
service_manager->GetServiceByContractID(