Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29369520: Issue #4692 - Rewrite web request task to avoid engine self-reference

Created:
Dec. 24, 2016, 4:48 p.m. by Eric
Modified:
Dec. 24, 2016, 5:14 p.m.
Reviewers:
sergei, Felix Dahlke
Visibility:
Public.

Description

Issue #4692 - Rewrite web request task to avoid engine self-reference Rewrite the C++ implementation of JS "_webRequest.GET" to use v8 types instead of the wrapped ones that include shared pointers to the engine. Change initialization of global JS property "_webRequest", moving it to the constructor of `JsEngineInternal`. Initialize the associated JS function with `MakeCallback`, which uses a plain engine pointer and not a smart pointer. Add value functions that avoid shared pointers to the engine, one for string conversion and three for setting JS object properties. These substitute for equivalent methods in `JsValue`. Keep a single `JsEnginePtr` in the web request task object. This compensates for the deficiency that we have no other way of keeping an engine in existence for the duration of the task.

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -81 lines) Patch
M libadblockplus.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M src/GlobalJsObject.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M src/JsEngine.cpp View 2 chunks +8 lines, -0 lines 0 comments Download
M src/JsValue.cpp View 3 chunks +25 lines, -0 lines 0 comments Download
A src/Value.h View 1 chunk +34 lines, -0 lines 0 comments Download
M src/WebRequestJsObject.h View 1 chunk +1 line, -9 lines 0 comments Download
M src/WebRequestJsObject.cpp View 2 chunks +121 lines, -70 lines 0 comments Download

Messages

Total messages: 1
Eric
Dec. 24, 2016, 5:14 p.m. (2016-12-24 17:14:36 UTC) #1

          

Powered by Google App Engine
This is Rietveld