Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "config.h" | |
| 6 #include "bindings/core/v8/EvaluateExceptionDetailsFactory.h" | |
| 7 | |
| 8 #include "bindings/core/v8/V8Binding.h" | |
| 9 | |
| 10 #include <v8-debug.h> | |
| 11 | |
| 12 namespace WebCore { | |
| 13 | |
| 14 v8::Handle<v8::Object> createEvaluateExceptionDetails(v8::Handle<v8::Message> me ssage, v8::Isolate* isolate) | |
|
pfeldman
2014/07/05 20:11:06
Converting a v8::Message into v8::Object of an ad-
| |
| 15 { | |
| 16 v8::Handle<v8::Object> exceptionDetails = v8::Object::New(isolate); | |
| 17 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "text"), message->Get ()); | |
| 18 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "url"), message->GetS criptOrigin().ResourceName()); | |
| 19 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "line"), v8::Integer: :New(isolate, message->GetLineNumber())); | |
| 20 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "column"), v8::Intege r::New(isolate, message->GetStartColumn())); | |
| 21 exceptionDetails->Set(v8::String::NewFromUtf8(isolate, "stackTrace"), messag e->GetStackTrace()->AsArray()); | |
| 22 return exceptionDetails; | |
| 23 } | |
| 24 | |
| 25 } // namespace WebCore | |
| OLD | NEW |