| Index: Source/modules/crypto/CryptoResultImpl.cpp
|
| diff --git a/Source/modules/crypto/CryptoResultImpl.cpp b/Source/modules/crypto/CryptoResultImpl.cpp
|
| index cf336ea672fcfe2f3628aebba037e4c8be6ec281..0ce4e09045b75c48f7c6e6868ce1bc859be295ed 100644
|
| --- a/Source/modules/crypto/CryptoResultImpl.cpp
|
| +++ b/Source/modules/crypto/CryptoResultImpl.cpp
|
| @@ -31,6 +31,7 @@
|
| #include "config.h"
|
| #include "modules/crypto/CryptoResultImpl.h"
|
|
|
| +#include "bindings/v8/Dictionary.h"
|
| #include "bindings/v8/ScriptPromiseResolver.h"
|
| #include "bindings/v8/ScriptState.h"
|
| #include "core/dom/ContextLifecycleObserver.h"
|
| @@ -157,16 +158,15 @@ void CryptoResultImpl::completeWithKeyPair(const blink::WebCryptoKey& publicKey,
|
| ScriptState* scriptState = m_resolver->scriptState();
|
| ScriptState::Scope scope(scriptState);
|
|
|
| - // FIXME: Use Dictionary instead, to limit amount of direct v8 access used from WebCore.
|
| - v8::Handle<v8::Object> keyPair = v8::Object::New(scriptState->isolate());
|
| + Dictionary keyPair(scriptState->isolate());
|
|
|
| v8::Handle<v8::Value> publicKeyValue = toV8NoInline(CryptoKey::create(publicKey), scriptState->context()->Global(), scriptState->isolate());
|
| v8::Handle<v8::Value> privateKeyValue = toV8NoInline(CryptoKey::create(privateKey), scriptState->context()->Global(), scriptState->isolate());
|
|
|
| - keyPair->Set(v8::String::NewFromUtf8(scriptState->isolate(), "publicKey"), publicKeyValue);
|
| - keyPair->Set(v8::String::NewFromUtf8(scriptState->isolate(), "privateKey"), privateKeyValue);
|
| + keyPair.set("publicKey", publicKeyValue);
|
| + keyPair.set("privateKey", privateKeyValue);
|
|
|
| - m_resolver->resolve(v8::Handle<v8::Value>(keyPair));
|
| + m_resolver->resolve(keyPair.v8Value());
|
| }
|
| }
|
|
|
|
|