  void SetIsolatedWorldInfo(v8::Isolate* isolate,
                            int world_id,
                            const gin_helper::Dictionary& options) {
    content::RenderFrame* render_frame;
    if (!MaybeGetRenderFrame(isolate, "setIsolatedWorldInfo", &render_frame))
      return;

    std::string origin_url, security_policy, name;
    options.Get("securityOrigin", &origin_url);
    options.Get("csp", &security_policy);
    options.Get("name", &name);

    if (!security_policy.empty() && origin_url.empty()) {
      gin_helper::ErrorThrower(isolate).ThrowError(
          "If csp is specified, securityOrigin should also be specified");
      return;
    }

    blink::WebIsolatedWorldInfo info;
    info.security_origin = blink::WebSecurityOrigin::CreateFromString(
        blink::WebString::FromUTF8(origin_url));
    info.content_security_policy = blink::WebString::FromUTF8(security_policy);
    info.human_readable_name = blink::WebString::FromUTF8(name);
    blink::SetIsolatedWorldInfo(world_id, info);
  }
  void SetIsolatedWorldInfo(v8::Isolate* isolate,
                            int world_id,
                            const gin_helper::Dictionary& options) {
    content::RenderFrame* render_frame;
    if (!MaybeGetRenderFrame(isolate, "setIsolatedWorldInfo", &render_frame))
      return;

    std::string origin_url, security_policy, name;
    options.Get("securityOrigin", &origin_url);
    options.Get("csp", &security_policy);
    options.Get("name", &name);

    if (!security_policy.empty() && origin_url.empty()) {
      gin_helper::ErrorThrower(isolate).ThrowError(
          "If csp is specified, securityOrigin should also be specified");
      return;
    }

    blink::WebIsolatedWorldInfo info;
    info.security_origin = blink::WebSecurityOrigin::CreateFromString(
        blink::WebString::FromUTF8(origin_url));
    info.content_security_policy = blink::WebString::FromUTF8(security_policy);
    info.human_readable_name = blink::WebString::FromUTF8(name);
    blink::SetIsolatedWorldInfo(world_id, info);
  }