| Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
|
| index 76ca1263094f78a0b2895652f1f5fe97f84566a9..c0e45245edcc958388a337a6fe61d9b935be6071 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
|
| @@ -1004,4 +1004,18 @@ v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value> value,
|
| return value;
|
| }
|
|
|
| +v8::Local<v8::Value> fromJSONString(v8::Isolate* isolate,
|
| + const String& stringifiedJSON,
|
| + ExceptionState& exceptionState) {
|
| + v8::Local<v8::Value> parsed;
|
| + v8::TryCatch tryCatch(isolate);
|
| + if (!v8Call(v8::JSON::Parse(isolate, v8String(isolate, stringifiedJSON)),
|
| + parsed, tryCatch)) {
|
| + if (tryCatch.HasCaught())
|
| + exceptionState.rethrowV8Exception(tryCatch.Exception());
|
| + }
|
| +
|
| + return parsed;
|
| +}
|
| +
|
| } // namespace blink
|
|
|