Code:    static void GetCSI(const v8::FunctionCallbackInfo<v8::Value>& args) {
     WebLocalFrame* frame = WebLocalFrame::frameForCurrentContext();
    if (frame) {
      WebDataSource* data_source = frame->dataSource();
      if (data_source) {
        DocumentState* document_state =
            DocumentState::FromDataSource(data_source);
        v8::Isolate* isolate = args.GetIsolate();
        v8::Local<v8::Object> csi = v8::Object::New(isolate);
        base::Time now = base::Time::Now();
        base::Time start = document_state->request_time().is_null() ?
            document_state->start_load_time() :
            document_state->request_time();
        base::Time onload = document_state->finish_document_load_time();
        base::TimeDelta page = now - start;
        csi->Set(v8::String::NewFromUtf8(isolate, "startE"),
                 v8::Number::New(isolate, floor(start.ToDoubleT() * 1000)));
        csi->Set(v8::String::NewFromUtf8(isolate, "onloadT"),
                 v8::Number::New(isolate, floor(onload.ToDoubleT() * 1000)));
        csi->Set(v8::String::NewFromUtf8(isolate, "pageT"),
                 v8::Number::New(isolate, page.InMillisecondsF()));
        csi->Set(
            v8::String::NewFromUtf8(isolate, "tran"),
            v8::Number::New(
                isolate, GetCSITransitionType(data_source->navigationType())));
        args.GetReturnValue().Set(csi);
        return;
      }
     }
    args.GetReturnValue().SetNull();
    return;
   }

Vulnerability Type: DoS 
CWE ID: 
Summary: Use-after-free vulnerability in the GetLoadTimes function in renderer/loadtimes_extension_bindings.cc in the Extensions implementation in Google Chrome before 49.0.2623.108 allows remote attackers to cause a denial of service or possibly have unspecified other impact via crafted JavaScript code.
Commit Message: Cache csi info before passing it to JS setters.

JS setters invalidate the pointers frame, data_source and document_state.

BUG=590455

Review URL: https://codereview.chromium.org/1751553002

Cr-Commit-Position: refs/heads/master@{#379047}