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

Unified Diff: plugins/org.chromium.sdk/src/org/chromium/sdk/internal/v8native/protocol/V8ProtocolUtil.java

Issue 11662019: Support variable changing in SDK interface and v8 native (Closed) Base URL: https://chromedevtools.googlecode.com/svn/trunk
Patch Set: merge Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: plugins/org.chromium.sdk/src/org/chromium/sdk/internal/v8native/protocol/V8ProtocolUtil.java
diff --git a/plugins/org.chromium.sdk/src/org/chromium/sdk/internal/v8native/protocol/V8ProtocolUtil.java b/plugins/org.chromium.sdk/src/org/chromium/sdk/internal/v8native/protocol/V8ProtocolUtil.java
index 069714112006541dd995b0d3b71ee55b2d350ece..d9640ccd7af30ea389a7a42c051fd81c827638e4 100755
--- a/plugins/org.chromium.sdk/src/org/chromium/sdk/internal/v8native/protocol/V8ProtocolUtil.java
+++ b/plugins/org.chromium.sdk/src/org/chromium/sdk/internal/v8native/protocol/V8ProtocolUtil.java
@@ -8,6 +8,7 @@ import java.util.AbstractList;
import java.util.ArrayList;
import java.util.List;
+import org.chromium.sdk.JsValue;
import org.chromium.sdk.Script;
import org.chromium.sdk.Script.Type;
import org.chromium.sdk.Version;
@@ -329,6 +330,14 @@ public class V8ProtocolUtil {
return Version.parseString(versionString);
}
+ // This method extracts string message from exception value. The accurate way is to get
+ // message property, but since we currently don't have true exception values (we have only
+ // surrogate strings), the current approach is ok. Later this method may become
+ // asynchronous.
+ public static String getExceptionString(JsValue exception) {
+ return exception.getValueString();
+ }
+
private static String getNameOrInferred(JSONObject obj, V8Protocol nameProperty) {
String name = JsonUtil.getAsString(obj, nameProperty);
if (isNullOrEmpty(name)) {

Powered by Google App Engine
This is Rietveld 408576698