| Index: samples/process.cc
|
| diff --git a/samples/process.cc b/samples/process.cc
|
| index fd3a82163904b376dc60a24a08298ff1c7a32a22..8a41faec9b5afc21c867c3630c3723b66c1f0099 100644
|
| --- a/samples/process.cc
|
| +++ b/samples/process.cc
|
| @@ -168,11 +168,12 @@ bool JsHttpRequestProcessor::Initialize(map<string, string>* opts,
|
| // is what we need for the reference to remain after we return from
|
| // this method. That persistent handle has to be disposed in the
|
| // destructor.
|
| - context_.Reset(GetIsolate(), Context::New(GetIsolate(), NULL, global));
|
| + v8::Handle<v8::Context> context = Context::New(GetIsolate(), NULL, global);
|
| + context_.Reset(GetIsolate(), context);
|
|
|
| // Enter the new context so all the following operations take place
|
| // within it.
|
| - Context::Scope context_scope(GetIsolate(), context_);
|
| + Context::Scope context_scope(context);
|
|
|
| // Make the options mapping available within the context
|
| if (!InstallMaps(opts, output))
|
| @@ -253,9 +254,12 @@ bool JsHttpRequestProcessor::Process(HttpRequest* request) {
|
| // Create a handle scope to keep the temporary object references.
|
| HandleScope handle_scope(GetIsolate());
|
|
|
| + v8::Local<v8::Context> context =
|
| + v8::Local<v8::Context>::New(GetIsolate(), context_);
|
| +
|
| // Enter this processor's context so all the remaining operations
|
| // take place there
|
| - Context::Scope context_scope(GetIsolate(), context_);
|
| + Context::Scope context_scope(context);
|
|
|
| // Wrap the C++ request object in a JavaScript wrapper
|
| Handle<Object> request_obj = WrapRequest(request);
|
|
|