| Index: samples/process.cc
|
| diff --git a/samples/process.cc b/samples/process.cc
|
| index 4dcc09a56b775c101ade9fced34b176e4b4eb7b1..75d6582e82b8c69aecb8a707ee40f6b75ccf18bb 100644
|
| --- a/samples/process.cc
|
| +++ b/samples/process.cc
|
| @@ -25,6 +25,11 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| +// TODO(dcarney): remove this
|
| +#define V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR
|
| +#define V8_ALLOW_ACCESS_TO_PERSISTENT_IMPLICIT
|
| +#define V8_ALLOW_ACCESS_TO_PERSISTENT_ARROW
|
| +
|
| #include <v8.h>
|
|
|
| #include <string>
|
| @@ -167,7 +172,7 @@ bool JsHttpRequestProcessor::Initialize(map<string, string>* opts,
|
|
|
| // Enter the new context so all the following operations take place
|
| // within it.
|
| - Context::Scope context_scope(context_);
|
| + Context::Scope context_scope(GetIsolate(), context_);
|
|
|
| // Make the options mapping available within the context
|
| if (!InstallMaps(opts, output))
|
| @@ -250,7 +255,7 @@ bool JsHttpRequestProcessor::Process(HttpRequest* request) {
|
|
|
| // Enter this processor's context so all the remaining operations
|
| // take place there
|
| - Context::Scope context_scope(context_);
|
| + Context::Scope context_scope(GetIsolate(), context_);
|
|
|
| // Wrap the C++ request object in a JavaScript wrapper
|
| Handle<Object> request_obj = WrapRequest(request);
|
| @@ -303,7 +308,8 @@ Handle<Object> JsHttpRequestProcessor::WrapMap(map<string, string>* obj) {
|
| Handle<ObjectTemplate> raw_template = MakeMapTemplate(GetIsolate());
|
| map_template_ = Persistent<ObjectTemplate>::New(GetIsolate(), raw_template);
|
| }
|
| - Handle<ObjectTemplate> templ = map_template_;
|
| + Handle<ObjectTemplate> templ =
|
| + Local<ObjectTemplate>::New(GetIsolate(), map_template_);
|
|
|
| // Create an empty map wrapper.
|
| Handle<Object> result = templ->NewInstance();
|
| @@ -410,7 +416,8 @@ Handle<Object> JsHttpRequestProcessor::WrapRequest(HttpRequest* request) {
|
| request_template_ =
|
| Persistent<ObjectTemplate>::New(GetIsolate(), raw_template);
|
| }
|
| - Handle<ObjectTemplate> templ = request_template_;
|
| + Handle<ObjectTemplate> templ =
|
| + Local<ObjectTemplate>::New(GetIsolate(), request_template_);
|
|
|
| // Create an empty http request wrapper.
|
| Handle<Object> result = templ->NewInstance();
|
|
|