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

Unified Diff: Source/bindings/dart/DartHandleProxy.cpp

Issue 81213004: Demangle names before using them as properties for DartHandleProxies. (Closed) Base URL: svn://svn.chromium.org/multivm/branches/1650/blink
Patch Set: rebase Created 7 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/DartHandleProxy.cpp
diff --git a/Source/bindings/dart/DartHandleProxy.cpp b/Source/bindings/dart/DartHandleProxy.cpp
index fe0bf72642fb2cb4babb6966192152fd6eb201df..fa0dafbac8f1a719ee6168c8ba36fafa4b889f4a 100644
--- a/Source/bindings/dart/DartHandleProxy.cpp
+++ b/Source/bindings/dart/DartHandleProxy.cpp
@@ -139,6 +139,11 @@ Dart_Handle addTrailingDot(Dart_Handle str)
return DartUtilities::invokeUtilsMethod("addTrailingDot", 1, &str);
}
+Dart_Handle demangle(Dart_Handle str)
+{
+ return DartUtilities::invokeUtilsMethod("demangle", 1, &str);
+}
+
Dart_Handle lookupValueForEncodedMapKey(Dart_Handle object, Dart_Handle key)
{
Dart_Handle args[] = {object, key};
@@ -228,6 +233,7 @@ void addFunctionNames(Dart_Handle handle, v8::Local<v8::Array>& properties, intp
if (isConstructor)
functionName = stripClassName(functionName, Dart_TypeName(handle));
+ functionName = demangle(functionName);
properties->Set(*count, V8Converter::stringToV8(functionName));
*count = *count + 1;
}
@@ -255,7 +261,7 @@ void addFieldNames(Dart_Handle fieldNames, v8::Local<v8::Array>& properties, int
Dart_ListLength(fieldNames, &length);
for (intptr_t i = 0; i < length; i += 2) {
Dart_Handle fieldName = Dart_ListGetAt(fieldNames, i);
- properties->Set(*count, V8Converter::stringToV8(fieldName));
+ properties->Set(*count, V8Converter::stringToV8(demangle(fieldName)));
*count = *count + 1;
}
}
@@ -553,7 +559,7 @@ static void libraryPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>&
if (!Dart_IsNull(importPrefix)) {
ASSERT(Dart_IsString(importPrefix));
properties->Set(count, V8Converter::stringToV8(
- stripTrailingDot(importPrefix)));
+ demangle(stripTrailingDot(importPrefix))));
count++;
}
bool equals = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698