Bug 659536 part.2 Replace nsContentUtils::GetIntPref() with Preferences::GetInt() or Preferences::GetUint() r=roc
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
|
||||
#include "base/process_util.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "mozilla/ipc/SyncChannel.h"
|
||||
#include "mozilla/plugins/PluginModuleParent.h"
|
||||
@@ -71,6 +72,7 @@ using base::KillProcess;
|
||||
using mozilla::PluginLibrary;
|
||||
using mozilla::ipc::SyncChannel;
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::plugins;
|
||||
|
||||
static const char kTimeoutPref[] = "dom.ipc.plugins.timeoutSecs";
|
||||
@@ -90,7 +92,7 @@ PluginModuleParent::LoadModule(const char* aFilePath)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG_FUNCTION;
|
||||
|
||||
PRInt32 prefSecs = nsContentUtils::GetIntPref(kLaunchTimeoutPref, 0);
|
||||
PRInt32 prefSecs = Preferences::GetInt(kLaunchTimeoutPref, 0);
|
||||
|
||||
// Block on the child process being launched and initialized.
|
||||
nsAutoPtr<PluginModuleParent> parent(new PluginModuleParent(aFilePath));
|
||||
@@ -223,7 +225,7 @@ PluginModuleParent::TimeoutChanged(const char* aPref, void* aModule)
|
||||
NS_ABORT_IF_FALSE(!strcmp(aPref, kTimeoutPref),
|
||||
"unexpected pref callback");
|
||||
|
||||
PRInt32 timeoutSecs = nsContentUtils::GetIntPref(kTimeoutPref, 0);
|
||||
PRInt32 timeoutSecs = Preferences::GetInt(kTimeoutPref, 0);
|
||||
int32 timeoutMs = (timeoutSecs > 0) ? (1000 * timeoutSecs) :
|
||||
SyncChannel::kNoTimeout;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user