Changeset 58345 in webkit
- Timestamp:
- Apr 27, 2010 3:51:27 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r58342 r58345 1 2010-04-27 James Robinson <jamesr@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Fix gcc 4.4.1 warnings on Linux in the chromium V8 bindings code. 6 https://bugs.webkit.org/show_bug.cgi?id=38153 7 8 * bindings/scripts/CodeGeneratorV8.pm: 9 * bindings/v8/V8Proxy.cpp: 10 (WebCore::V8Proxy::callFunction): 11 1 12 2010-04-27 Eric Seidel <eric@webkit.org> 2 13 -
trunk/WebCore/bindings/scripts/CodeGeneratorGObject.pm
r58108 r58345 209 209 "char", "char", 210 210 "long", "long", 211 "long long", "int64", 211 212 "short", "int", 212 213 "uchar", "uchar", … … 233 234 "char", "gchar", 234 235 "long", "glong", 236 "long long", "gint64", 235 237 "short", "gshort", 236 238 "uchar", "guchar", … … 256 258 return 0 if $type eq "char"; 257 259 return 0 if $type eq "long"; 260 return 0 if $type eq "long long"; 258 261 return 0 if $type eq "short"; 259 262 return 0 if $type eq "uchar"; … … 440 443 "uint64", "0, /* min */\nG_MAXUINT64, /* min */\n0, /* default */", 441 444 "long", "G_MINLONG, /* min */\nG_MAXLONG, /* max */\n0, /* default */", 445 "int64", "G_MININT64, /* min */\nG_MAXINT64, /* max */\n0, /* default */", 442 446 "ulong", "0, /* min */\nG_MAXULONG, /* max */\n0, /* default */", 443 447 "uint", "0, /* min */\nG_MAXUINT, /* max */\n0, /* default */", … … 585 589 return "" if $type eq "int"; 586 590 return "" if $type eq "long"; 591 return "" if $type eq "long long"; 587 592 return "" if $type eq "short"; 588 593 return "" if $type eq "char"; -
trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm
r58333 r58345 2853 2853 2854 2854 return "return v8DateOrNull($value)" if $type eq "Date"; 2855 # long long and unsigned long long are not representable in ECMAScript. 2856 return "return v8::Number::New(static_cast<double>($value))" if $type eq "long long" or $type eq "unsigned long long"; 2855 2857 return "return v8::Number::New($value)" if $codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType"; 2856 2858 return "return $value.v8Value()" if $nativeType eq "ScriptValue"; -
trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
r58333 r58345 322 322 } 323 323 324 gint64 325 webkit_dom_test_obj_get_long_long_attr (WebKitDOMTestObj *self) 326 { 327 g_return_val_if_fail (self, 0); 328 WebCore::TestObj * item = WebKit::core(self); 329 gint64 res = item->longLongAttr(); 330 return res; 331 332 } 333 334 void 335 webkit_dom_test_obj_set_long_long_attr (WebKitDOMTestObj *self, gint64 value) 336 { 337 g_return_if_fail (self); 338 WebCore::TestObj * item = WebKit::core(self); 339 item->setLongLongAttr(value); 340 341 } 342 343 guint64 344 webkit_dom_test_obj_get_unsigned_long_long_attr (WebKitDOMTestObj *self) 345 { 346 g_return_val_if_fail (self, 0); 347 WebCore::TestObj * item = WebKit::core(self); 348 guint64 res = item->unsignedLongLongAttr(); 349 return res; 350 351 } 352 353 void 354 webkit_dom_test_obj_set_unsigned_long_long_attr (WebKitDOMTestObj *self, guint64 value) 355 { 356 g_return_if_fail (self); 357 WebCore::TestObj * item = WebKit::core(self); 358 item->setUnsignedLongLongAttr(value); 359 360 } 361 324 362 gchar* 325 363 webkit_dom_test_obj_get_string_attr (WebKitDOMTestObj *self) … … 463 501 PROP_READ_ONLY_TEST_OBJ_ATTR, 464 502 PROP_INT_ATTR, 503 PROP_LONG_LONG_ATTR, 504 PROP_UNSIGNED_LONG_LONG_ATTR, 465 505 PROP_STRING_ATTR, 466 506 PROP_TEST_OBJ_ATTR, … … 499 539 break; 500 540 } 541 case PROP_UNSIGNED_LONG_LONG_ATTR: 542 { 543 coreSelf->setUnsignedLongLongAttr((g_value_get_uint64(value)) ); 544 break; 545 } 501 546 case PROP_STRING_ATTR: 502 547 { … … 556 601 { 557 602 g_value_set_long(value, coreSelf->intAttr()); 603 break; 604 } 605 case PROP_LONG_LONG_ATTR: 606 { 607 g_value_set_int64(value, coreSelf->longLongAttr()); 608 break; 609 } 610 case PROP_UNSIGNED_LONG_LONG_ATTR: 611 { 612 g_value_set_uint64(value, coreSelf->unsignedLongLongAttr()); 558 613 break; 559 614 } … … 636 691 WEBKIT_PARAM_READWRITE)); 637 692 g_object_class_install_property(gobjectClass, 693 PROP_LONG_LONG_ATTR, 694 g_param_spec_int64("long-long-attr", /* name */ 695 "test_obj_long-long-attr", /* short description */ 696 "read-write gint64 TestObj.long-long-attr", /* longer - could do with some extra doc stuff here */ 697 G_MININT64, /* min */ 698 G_MAXINT64, /* max */ 699 0, /* default */ 700 WEBKIT_PARAM_READWRITE)); 701 g_object_class_install_property(gobjectClass, 702 PROP_UNSIGNED_LONG_LONG_ATTR, 703 g_param_spec_uint64("unsigned-long-long-attr", /* name */ 704 "test_obj_unsigned-long-long-attr", /* short description */ 705 "read-write guint64 TestObj.unsigned-long-long-attr", /* longer - could do with some extra doc stuff here */ 706 0, /* min */ 707 G_MAXUINT64, /* min */ 708 0, /* default */ 709 WEBKIT_PARAM_READWRITE)); 710 g_object_class_install_property(gobjectClass, 638 711 PROP_STRING_ATTR, 639 712 g_param_spec_string("string-attr", /* name */ -
trunk/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
r58333 r58345 128 128 webkit_dom_test_obj_set_int_attr (WebKitDOMTestObj *self, glong value); 129 129 130 WEBKIT_API gint64 131 webkit_dom_test_obj_get_long_long_attr (WebKitDOMTestObj *self); 132 133 WEBKIT_API void 134 webkit_dom_test_obj_set_long_long_attr (WebKitDOMTestObj *self, gint64 value); 135 136 WEBKIT_API guint64 137 webkit_dom_test_obj_get_unsigned_long_long_attr (WebKitDOMTestObj *self); 138 139 WEBKIT_API void 140 webkit_dom_test_obj_set_unsigned_long_long_attr (WebKitDOMTestObj *self, guint64 value); 141 130 142 WEBKIT_API gchar* 131 143 webkit_dom_test_obj_get_string_attr (WebKitDOMTestObj *self); -
trunk/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r58333 r58345 46 46 #endif 47 47 48 static const HashTableValue JSTestObjTableValues[1 2] =48 static const HashTableValue JSTestObjTableValues[14] = 49 49 { 50 50 { "readOnlyIntAttr", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyIntAttr), (intptr_t)0 THUNK_GENERATOR(0) }, … … 52 52 { "readOnlyTestObjAttr", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyTestObjAttr), (intptr_t)0 THUNK_GENERATOR(0) }, 53 53 { "intAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjIntAttr), (intptr_t)setJSTestObjIntAttr THUNK_GENERATOR(0) }, 54 { "longLongAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongLongAttr), (intptr_t)setJSTestObjLongLongAttr THUNK_GENERATOR(0) }, 55 { "unsignedLongLongAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongAttr), (intptr_t)setJSTestObjUnsignedLongLongAttr THUNK_GENERATOR(0) }, 54 56 { "stringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t)setJSTestObjStringAttr THUNK_GENERATOR(0) }, 55 57 { "testObjAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t)setJSTestObjTestObjAttr THUNK_GENERATOR(0) }, … … 248 250 } 249 251 252 JSValue jsTestObjLongLongAttr(ExecState* exec, JSValue slotBase, const Identifier&) 253 { 254 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 255 UNUSED_PARAM(exec); 256 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 257 JSValue result = jsNumber(exec, imp->longLongAttr()); 258 return result; 259 } 260 261 JSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, JSValue slotBase, const Identifier&) 262 { 263 JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase)); 264 UNUSED_PARAM(exec); 265 TestObj* imp = static_cast<TestObj*>(castedThis->impl()); 266 JSValue result = jsNumber(exec, imp->unsignedLongLongAttr()); 267 return result; 268 } 269 250 270 JSValue jsTestObjStringAttr(ExecState* exec, JSValue slotBase, const Identifier&) 251 271 { … … 314 334 TestObj* imp = static_cast<TestObj*>(castedThisObj->impl()); 315 335 imp->setIntAttr(value.toInt32(exec)); 336 } 337 338 void setJSTestObjLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value) 339 { 340 JSTestObj* castedThisObj = static_cast<JSTestObj*>(thisObject); 341 TestObj* imp = static_cast<TestObj*>(castedThisObj->impl()); 342 imp->setLongLongAttr(static_cast<long long>(value.toInteger(exec))); 343 } 344 345 void setJSTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue value) 346 { 347 JSTestObj* castedThisObj = static_cast<JSTestObj*>(thisObject); 348 TestObj* imp = static_cast<TestObj*>(castedThisObj->impl()); 349 imp->setUnsignedLongLongAttr(static_cast<unsigned long long>(value.toInteger(exec))); 316 350 } 317 351 -
trunk/WebCore/bindings/scripts/test/JS/JSTestObj.h
r58333 r58345 117 117 JSC::JSValue jsTestObjIntAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 118 118 void setJSTestObjIntAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 119 JSC::JSValue jsTestObjLongLongAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 120 void setJSTestObjLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 121 JSC::JSValue jsTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 122 void setJSTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 119 123 JSC::JSValue jsTestObjStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); 120 124 void setJSTestObjStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); -
trunk/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
r58333 r58345 40 40 - (int)intAttr; 41 41 - (void)setIntAttr:(int)newIntAttr; 42 - (long long)longLongAttr; 43 - (void)setLongLongAttr:(long long)newLongLongAttr; 44 - (unsigned long long)unsignedLongLongAttr; 45 - (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr; 42 46 - (NSString *)stringAttr; 43 47 - (void)setStringAttr:(NSString *)newStringAttr; -
trunk/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
r58333 r58345 95 95 } 96 96 97 - (long long)longLongAttr 98 { 99 return IMPL->longLongAttr(); 100 } 101 102 - (void)setLongLongAttr:(long long)newLongLongAttr 103 { 104 IMPL->setLongLongAttr(newLongLongAttr); 105 } 106 107 - (unsigned long long)unsignedLongLongAttr 108 { 109 return IMPL->unsignedLongLongAttr(); 110 } 111 112 - (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr 113 { 114 IMPL->setUnsignedLongLongAttr(newUnsignedLongLongAttr); 115 } 116 97 117 - (NSString *)stringAttr 98 118 { -
trunk/WebCore/bindings/scripts/test/TestObj.idl
r58333 r58345 36 36 readonly attribute TestObj readOnlyTestObjAttr; 37 37 attribute long intAttr; 38 attribute long long longLongAttr; 39 attribute unsigned long long unsignedLongLongAttr; 38 40 attribute DOMString stringAttr; 39 41 attribute TestObj testObjAttr; -
trunk/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
r58333 r58345 87 87 } 88 88 89 static v8::Handle<v8::Value> longLongAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 90 { 91 INC_STATS("DOM.TestObj.longLongAttr._get"); 92 TestObj* imp = V8TestObj::toNative(info.Holder()); 93 return v8::Number::New(static_cast<double>(imp->longLongAttr())); 94 } 95 96 static void longLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 97 { 98 INC_STATS("DOM.TestObj.longLongAttr._set"); 99 TestObj* imp = V8TestObj::toNative(info.Holder()); 100 long long v = toInt64(value); 101 imp->setLongLongAttr(WTF::getPtr(v)); 102 return; 103 } 104 105 static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 106 { 107 INC_STATS("DOM.TestObj.unsignedLongLongAttr._get"); 108 TestObj* imp = V8TestObj::toNative(info.Holder()); 109 return v8::Number::New(static_cast<double>(imp->unsignedLongLongAttr())); 110 } 111 112 static void unsignedLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info) 113 { 114 INC_STATS("DOM.TestObj.unsignedLongLongAttr._set"); 115 TestObj* imp = V8TestObj::toNative(info.Holder()); 116 unsigned long long v = toInt64(value); 117 imp->setUnsignedLongLongAttr(WTF::getPtr(v)); 118 return; 119 } 120 89 121 static v8::Handle<v8::Value> stringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) 90 122 { … … 523 555 // Attribute 'intAttr' (Type: 'attribute' ExtAttr: '') 524 556 {"intAttr", TestObjInternal::intAttrAttrGetter, TestObjInternal::intAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 557 // Attribute 'longLongAttr' (Type: 'attribute' ExtAttr: '') 558 {"longLongAttr", TestObjInternal::longLongAttrAttrGetter, TestObjInternal::longLongAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 559 // Attribute 'unsignedLongLongAttr' (Type: 'attribute' ExtAttr: '') 560 {"unsignedLongLongAttr", TestObjInternal::unsignedLongLongAttrAttrGetter, TestObjInternal::unsignedLongLongAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 525 561 // Attribute 'stringAttr' (Type: 'attribute' ExtAttr: '') 526 562 {"stringAttr", TestObjInternal::stringAttrAttrGetter, TestObjInternal::stringAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, -
trunk/WebCore/bindings/v8/V8Proxy.cpp
r57269 r58345 475 475 #if ENABLE(INSPECTOR) 476 476 Page* inspectedPage = InspectorTimelineAgent::instanceCount() ? m_frame->page(): 0; 477 if (inspectedPage) 477 if (inspectedPage) { 478 478 if (InspectorTimelineAgent* timelineAgent = inspectedPage->inspectorTimelineAgent()) { 479 479 v8::ScriptOrigin origin = function->GetScriptOrigin(); … … 487 487 } else 488 488 inspectedPage = 0; 489 } 489 490 #endif // !ENABLE(INSPECTOR) 490 491
Note: See TracChangeset
for help on using the changeset viewer.