file in extensions/renderer/script_context.cc
After this patch I got a null '_url' var in the GetDebugString call because url_ setted after this call.. :
-#include <memory>
-
#include "base/command_line.h"
#include "base/logging.h"
#include "base/macros.h"
@@ -109,12 +107,13 @@ ScriptContext::ScriptContext(const v8::Local<v8::Context>& v8_context,
effective_context_type_(effective_context_type),
safe_builtins_(this),
isolate_(v8_context->GetIsolate()),
- url_(web_frame_ ? GetDataSourceURLForFrame(web_frame_) : GURL()), runner_(new Runner(this)) {
VLOG(1) << "Created context:\n" << GetDebugString(); gin::PerContextData* gin_data = gin::PerContextData::From(v8_context);
CHECK(gin_data);
gin_data->set_runner(runner_.get());
+ if (web_frame_)
+ url_ = GetAccessCheckedFrameURL(web_frame_); }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
is it possible to move VLOG(1)... to the line after the _url will be setted? :
...................................................................
+ if (web_frame_)
+ url_ = GetAccessCheckedFrameURL(web_frame_);
VLOG(1) << "Created context:\n" << GetDebugString();
...................................................................
Each times at the moment I should to make changes in this file locally each new version of Chromium if I want to check debugString...
Thanks.