Changeset 120063 in webkit
- Timestamp:
- Jun 12, 2012, 5:51:16 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r120060 r120063 1 2012-06-12 Balazs Kelemen <kbalazs@webkit.org> 2 3 [REGRESSION][WTR] Build fail with werror after r120054 4 https://bugs.webkit.org/show_bug.cgi?id=88862 5 6 Reviewed by Csaba Osztrogonác. 7 8 Some static helpers become unused after counterValueForElementById 9 has moved to Internals. Let's remove them. 10 11 * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: 12 (WTR): 13 1 14 2012-06-12 Csaba Osztrogonác <ossy@webkit.org> 2 15 -
trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
r120054 r120063 53 53 const double LayoutTestController::waitToDumpWatchdogTimerInterval = 6; 54 54 55 static JSValueRef propertyValue(JSContextRef context, JSObjectRef object, const char* propertyName)56 {57 if (!object)58 return 0;59 JSRetainPtr<JSStringRef> propertyNameString(Adopt, JSStringCreateWithUTF8CString(propertyName));60 JSValueRef exception;61 return JSObjectGetProperty(context, object, propertyNameString.get(), &exception);62 }63 64 static JSObjectRef propertyObject(JSContextRef context, JSObjectRef object, const char* propertyName)65 {66 JSValueRef value = propertyValue(context, object, propertyName);67 if (!value || !JSValueIsObject(context, value))68 return 0;69 return const_cast<JSObjectRef>(value);70 }71 72 static JSObjectRef getElementById(WKBundleFrameRef frame, JSStringRef elementId)73 {74 JSContextRef context = WKBundleFrameGetJavaScriptContext(frame);75 JSObjectRef document = propertyObject(context, JSContextGetGlobalObject(context), "document");76 if (!document)77 return 0;78 JSValueRef getElementById = propertyObject(context, document, "getElementById");79 if (!getElementById || !JSValueIsObject(context, getElementById))80 return 0;81 JSValueRef elementIdValue = JSValueMakeString(context, elementId);82 JSValueRef exception;83 JSValueRef element = JSObjectCallAsFunction(context, const_cast<JSObjectRef>(getElementById), document, 1, &elementIdValue, &exception);84 if (!element || !JSValueIsObject(context, element))85 return 0;86 return const_cast<JSObjectRef>(element);87 }88 89 55 PassRefPtr<LayoutTestController> LayoutTestController::create() 90 56 {
Note:
See TracChangeset
for help on using the changeset viewer.