Commit eaa05cec authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

Bypass ScriptValue in Document::createCSSStyleSheet.

ScriptPromise is perfectly happy with a v8::Local<v8::Value>, which is created
on the way to ScriptValue anyhow.

Change-Id: Ib9e6529bcac0262ffd2ddb89ce4de0cfe5587c81
Reviewed-on: https://chromium-review.googlesource.com/c/1316098Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605218}
parent decd40e6
...@@ -1139,8 +1139,7 @@ ScriptPromise Document::createCSSStyleSheet(ScriptState* script_state, ...@@ -1139,8 +1139,7 @@ ScriptPromise Document::createCSSStyleSheet(ScriptState* script_state,
CSSStyleSheet* sheet = CSSStyleSheet::Create(*this, options, exception_state); CSSStyleSheet* sheet = CSSStyleSheet::Create(*this, options, exception_state);
sheet->SetText(text, true /* allow_import_rules */, exception_state); sheet->SetText(text, true /* allow_import_rules */, exception_state);
sheet->SetAssociatedDocument(this); sheet->SetAssociatedDocument(this);
return ScriptPromise::Cast(script_state, return ScriptPromise::Cast(script_state, ToV8(sheet, script_state));
ScriptValue::From(script_state, sheet));
} }
CSSStyleSheet* Document::createCSSStyleSheetSync( CSSStyleSheet* Document::createCSSStyleSheetSync(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment