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

Issue 10305024: Simplify context setup, set properties on the global object directly instead of using templates (Closed)

Created:
April 18, 2013, 6:26 a.m. by Wladimir Palant
Modified:
May 7, 2013, 7:36 a.m.
Reviewers:
Felix Dahlke, Oleksandr
Visibility:
Public.

Description

Templates make sense if you have lots of contexts (e.g. different window objects) but we don`t.

Patch Set 1 #

Patch Set 2 : Unbitrotted patch #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -90 lines) Patch
M include/AdblockPlus/JsEngine.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/AppInfoJsObject.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/AppInfoJsObject.cpp View 1 1 chunk +8 lines, -10 lines 0 comments Download
M src/ConsoleJsObject.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ConsoleJsObject.cpp View 1 chunk +5 lines, -12 lines 0 comments Download
M src/FileSystemJsObject.h View 1 chunk +1 line, -1 line 0 comments Download
M src/FileSystemJsObject.cpp View 1 chunk +7 lines, -17 lines 0 comments Download
M src/GlobalJsObject.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/GlobalJsObject.cpp View 1 1 chunk +12 lines, -22 lines 2 comments Download
M src/JsEngine.cpp View 1 3 chunks +17 lines, -14 lines 0 comments Download
M src/WebRequestJsObject.h View 1 chunk +1 line, -1 line 0 comments Download
M src/WebRequestJsObject.cpp View 1 chunk +4 lines, -9 lines 0 comments Download

Messages

Total messages: 5
Wladimir Palant
April 18, 2013, 6:27 a.m. (2013-04-18 06:27:08 UTC) #1
Felix Dahlke
The second patch set says "Upload in progress" - Rietveld hiccup?
April 18, 2013, 11:12 a.m. (2013-04-18 11:12:55 UTC) #2
Wladimir Palant
On 2013/04/18 11:12:55, Felix H. Dahlke wrote: > The second patch set says "Upload in ...
April 18, 2013, 11:46 a.m. (2013-04-18 11:46:21 UTC) #3
Felix Dahlke
That's a mighty fine refactoring! One nit, otherwise LGTM. http://codereview.adblockplus.org/10305024/diff/5001/src/GlobalJsObject.cpp File src/GlobalJsObject.cpp (right): http://codereview.adblockplus.org/10305024/diff/5001/src/GlobalJsObject.cpp#newcode78 src/GlobalJsObject.cpp:78: ...
April 18, 2013, 12:46 p.m. (2013-04-18 12:46:50 UTC) #4
Wladimir Palant
April 18, 2013, 1:29 p.m. (2013-04-18 13:29:33 UTC) #5
http://codereview.adblockplus.org/10305024/diff/5001/src/GlobalJsObject.cpp
File src/GlobalJsObject.cpp (right):

http://codereview.adblockplus.org/10305024/diff/5001/src/GlobalJsObject.cpp#n...
src/GlobalJsObject.cpp:78: FileSystemJsObject::Setup(jsEngine,
jsEngine.NewObject()));
On 2013/04/18 12:46:50, Felix H. Dahlke wrote:
> Why pass a new object in? Seems to make more sense for the setup functions to
> create their own object and return it.

Merely for consistency. GlobaJsObject::Setup() cannot create a new object, it
has to work with the existing global. I can change it for all the other Setup()
functions if you prefer but then they will work differently from
GlobalJsObject::Setup().

Powered by Google App Engine
This is Rietveld