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

Delta Between Two Patch Sets: src/GlobalJsObject.cpp

Issue 10259001: XMLHttpRequest API (Closed)
Left Patch Set: Created April 10, 2013, 3:19 p.m.
Right Patch Set: Addressed review comments Created April 11, 2013, 4:30 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/GlobalJsObject.h ('k') | src/JsEngine.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #include <vector> 1 #include <vector>
2 #include <stdexcept> 2 #include <stdexcept>
3 3
4 #include "GlobalJsObject.h" 4 #include "GlobalJsObject.h"
5 #include "ConsoleJsObject.h" 5 #include "ConsoleJsObject.h"
6 #include "WebRequestJsObject.h" 6 #include "WebRequestJsObject.h"
7 #include "Thread.h" 7 #include "Thread.h"
8 8
9 using namespace AdblockPlus; 9 using namespace AdblockPlus;
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 v8::HandleScope handleScope; 94 v8::HandleScope handleScope;
95 const v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); 95 const v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New();
96 const v8::Handle<v8::ObjectTemplate> console = 96 const v8::Handle<v8::ObjectTemplate> console =
97 AdblockPlus::ConsoleJsObject::Create(errorCallback); 97 AdblockPlus::ConsoleJsObject::Create(errorCallback);
98 global->Set(v8::String::New("console"), console); 98 global->Set(v8::String::New("console"), console);
99 const v8::Handle<v8::FunctionTemplate> setTimeoutFunction = 99 const v8::Handle<v8::FunctionTemplate> setTimeoutFunction =
100 v8::FunctionTemplate::New(SetTimeoutCallback); 100 v8::FunctionTemplate::New(SetTimeoutCallback);
101 global->Set(v8::String::New("setTimeout"), setTimeoutFunction); 101 global->Set(v8::String::New("setTimeout"), setTimeoutFunction);
102 const v8::Handle<v8::ObjectTemplate> request = 102 const v8::Handle<v8::ObjectTemplate> request =
103 AdblockPlus::WebRequestJsObject::Create(webRequest); 103 AdblockPlus::WebRequestJsObject::Create(webRequest);
104 global->Set(v8::String::New("_request"), request); 104 global->Set(v8::String::New("_webRequest"), request);
Felix Dahlke 2013/04/11 09:33:42 I'd prefer _webRequest for consistency.
105 return handleScope.Close(global); 105 return handleScope.Close(global);
106 } 106 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld