本文整理汇总了C++中SerializedScriptValue类的典型用法代码示例。如果您正苦于以下问题:C++ SerializedScriptValue类的具体用法?C++ SerializedScriptValue怎么用?C++ SerializedScriptValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SerializedScriptValue类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: state
JSValue JSPopStateEvent::state(ExecState* exec) const
{
PopStateEvent* event = static_cast<PopStateEvent*>(impl());
SerializedScriptValue* serializedState = event->serializedState();
if (serializedState)
return serializedState->deserialize(exec, globalObject(), 0);
if (!event->state().hasNoValue())
return event->state().jsValue();
return jsNull();
}
示例2: INC_STATS
v8::Handle<v8::Value> V8PopStateEvent::stateAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.PopStateEvent.state");
PopStateEvent* event = V8PopStateEvent::toNative(info.Holder());
SerializedScriptValue* state = event->state();
if (!state)
return v8::Null();
return state->deserialize();
}
示例3: ASSERT
IDBValue::IDBValue(const SerializedScriptValue& scriptValue, const Vector<String>& blobURLs, const Vector<String>& blobFilePaths)
: m_data(ThreadSafeDataBuffer::copyVector(scriptValue.data()))
, m_blobURLs(blobURLs)
, m_blobFilePaths(blobFilePaths)
{
ASSERT(m_data.data());
}
示例4: putOrAdd
void InProcessIDBServer::putOrAdd(const IDBRequestData& requestData, IDBKey* key, SerializedScriptValue& value, const IndexedDB::ObjectStoreOverwriteMode overwriteMode)
{
RefPtr<InProcessIDBServer> self(this);
IDBKeyData keyData(key);
auto valueData = ThreadSafeDataBuffer::copyVector(value.data());
RunLoop::current().dispatch([this, self, requestData, keyData, valueData, overwriteMode] {
m_server->putOrAdd(requestData, keyData, valueData, overwriteMode);
});
}
示例5:
IDBValue::IDBValue(const SerializedScriptValue& scriptValue)
: m_data(ThreadSafeDataBuffer::copyVector(scriptValue.data()))
{
}
示例6:
IDBValue::IDBValue(const SerializedScriptValue& scriptValue)
: m_data(ThreadSafeDataBuffer::copyVector(scriptValue.data()))
, m_blobURLs(scriptValue.blobURLsIsolatedCopy())
{
}