| Index: content/renderer/pepper/pepper_try_catch.cc
|
| diff --git a/content/renderer/pepper/pepper_try_catch.cc b/content/renderer/pepper/pepper_try_catch.cc
|
| index 82be7360f5e03239801678aa467b91096a6245b4..2ee6ecf88b8e8805138757a35b860ca2b38d40df 100644
|
| --- a/content/renderer/pepper/pepper_try_catch.cc
|
| +++ b/content/renderer/pepper/pepper_try_catch.cc
|
| @@ -119,18 +119,17 @@ PepperTryCatchVar::PepperTryCatchVar(PepperPluginInstanceImpl* instance,
|
| PP_Var* exception)
|
| : PepperTryCatch(instance, V8VarConverter::kAllowObjectVars),
|
| handle_scope_(instance_->GetIsolate()),
|
| + context_(GetContext()),
|
| exception_(exception),
|
| exception_is_set_(false) {
|
| - // We switch to the plugin context.
|
| - v8::Handle<v8::Context> context = GetContext();
|
| - if (!context.IsEmpty())
|
| - context->Enter();
|
| + // We switch to the plugin context if it's not empty.
|
| + if (!context_.IsEmpty())
|
| + context_->Enter();
|
| }
|
|
|
| PepperTryCatchVar::~PepperTryCatchVar() {
|
| - v8::Handle<v8::Context> context = GetContext();
|
| - if (!context.IsEmpty())
|
| - context->Exit();
|
| + if (!context_.IsEmpty())
|
| + context_->Exit();
|
| }
|
|
|
| bool PepperTryCatchVar::HasException() {
|
|
|