  static int GetWebFrameId(v8::Local<v8::Object> content_window) {
    // Get the WebLocalFrame before (possibly) executing any user-space JS while
    // getting the |params|. We track the status of the RenderFrame via an
    // observer in case it is deleted during user code execution.
    content::RenderFrame* render_frame = GetRenderFrame(content_window);
    if (!render_frame)
      return -1;

    blink::WebLocalFrame* frame = render_frame->GetWebFrame();
    // Parent must exist.
    blink::WebFrame* parent_frame = frame->Parent();
    DCHECK(parent_frame);
    DCHECK(parent_frame->IsWebLocalFrame());

    return render_frame->GetRoutingID();
  }
  static int GetWebFrameId(v8::Local<v8::Object> content_window) {
     
     
     
    content::RenderFrame* render_frame = GetRenderFrame(content_window);
    if (!render_frame)
      return -1;

    blink::WebLocalFrame* frame = render_frame->GetWebFrame();
     
    blink::WebFrame* parent_frame = frame->Parent();
    DCHECK(parent_frame);
    DCHECK(parent_frame->IsWebLocalFrame());

    return render_frame->GetRoutingID();
  }