Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Side by Side Diff: Source/bindings/core/v8/EvaluateExceptionDetailsFactory.cpp

Issue 289423002: DevTools: added injectedScript.evaluateWithDetails, that return exception details if it occured (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698