| Index: third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
|
| diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
|
| index b84c746454fff3f7073519a482a6d6203e080718..9544b38798959e2c300d0bff32055185bb04f87e 100644
|
| --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
|
| +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothSupplement.cpp
|
| @@ -37,10 +37,15 @@ WebBluetooth* BluetoothSupplement::from(LocalFrame* frame)
|
|
|
| WebBluetooth* BluetoothSupplement::fromScriptState(ScriptState* scriptState)
|
| {
|
| - if (!scriptState->executionContext()->isDocument()) {
|
| + return fromExecutionContext(scriptState->executionContext());
|
| +}
|
| +
|
| +WebBluetooth* BluetoothSupplement::fromExecutionContext(ExecutionContext* executionContext)
|
| +{
|
| + if (!executionContext->isDocument()) {
|
| return nullptr;
|
| }
|
| - return BluetoothSupplement::from(static_cast<Document*>(scriptState->executionContext())->frame());
|
| + return BluetoothSupplement::from(static_cast<Document*>(executionContext)->frame());
|
| }
|
|
|
| DEFINE_TRACE(BluetoothSupplement)
|
|
|