Changeset 202275 in webkit
- Timestamp:
- Jun 21, 2016 8:44:50 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r202274 r202275 1 2016-06-21 Youenn Fablet <youennf@gmail.com> 2 3 Add bindings generator support to add a native JS function to both a 'name' and a private '@name' slot 4 https://bugs.webkit.org/show_bug.cgi?id=158777 5 6 Reviewed by Eric Carlson. 7 8 Adding a new PublicIdentifier keyword to cover the case of the same function exposed publicly and privately. 9 Renaming Private keyword to PrivateIdentifier. 10 Functions exposed both publicly and privately should set both keywords. 11 By default, functions are publically exposed. 12 13 Updated binding generator to generate public exposure except if PrivateIdentifer is set and PublicIdentifier is 14 not set. 15 16 Keeping skipping of ObjC/GObject binding for PrivateIdentifier-only functions. 17 18 Covered by rebased binding tests. 19 20 * Modules/fetch/FetchHeaders.idl: 21 * Modules/fetch/FetchResponse.idl: 22 * Modules/mediastream/MediaDevices.idl: 23 * Modules/mediastream/RTCPeerConnection.idl: 24 * bindings/scripts/CodeGeneratorGObject.pm: 25 (SkipFunction): 26 * bindings/scripts/CodeGeneratorJS.pm: 27 (GeneratePropertiesHashTable): 28 (GenerateImplementation): 29 * bindings/scripts/CodeGeneratorObjC.pm: 30 (SkipFunction): 31 * bindings/scripts/IDLAttributes.txt: 32 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: 33 (webkit_dom_test_obj_private_also_method): 34 * bindings/scripts/test/GObject/WebKitDOMTestObj.h: 35 * bindings/scripts/test/JS/JSTestObj.cpp: 36 (WebCore::JSTestObjPrototype::finishCreation): 37 (WebCore::jsTestObjPrototypeFunctionPrivateMethod): 38 (WebCore::jsTestObjPrototypeFunctionPrivateAlsoMethod): 39 * bindings/scripts/test/ObjC/DOMTestObj.h: 40 * bindings/scripts/test/ObjC/DOMTestObj.mm: 41 (-[DOMTestObj privateAlsoMethod:]): 42 * bindings/scripts/test/TestObj.idl: 43 1 44 2016-06-21 Dan Bernstein <mitz@apple.com> 2 45 -
trunk/Source/WebCore/Modules/fetch/FetchHeaders.idl
r199587 r202275 44 44 iterable<DOMString, DOMString>; 45 45 46 [Private , RaisesException, ImplementedAs=append] void appendFromJS(DOMString name, DOMString value);47 [Private , ImplementedAs=fill] void fillFromJS(FetchHeaders? headers);46 [PrivateIdentifier, RaisesException, ImplementedAs=append] void appendFromJS(DOMString name, DOMString value); 47 [PrivateIdentifier, ImplementedAs=fill] void fillFromJS(FetchHeaders? headers); 48 48 }; -
trunk/Source/WebCore/Modules/fetch/FetchResponse.idl
r199641 r202275 55 55 [NewObject, CallWith=ScriptExecutionContext, RaisesException] FetchResponse clone(); 56 56 57 [Private , RaisesException] void initializeWith(Dictionary parameters);57 [PrivateIdentifier, RaisesException] void initializeWith(Dictionary parameters); 58 58 }; 59 59 FetchResponse implements FetchBody; -
trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl
r192602 r202275 38 38 [RaisesException] Promise enumerateDevices(); 39 39 40 [Private , RaisesException, ImplementedAs=getUserMedia] Promise getUserMediaFromJS(Dictionary options);40 [PrivateIdentifier, RaisesException, ImplementedAs=getUserMedia] Promise getUserMediaFromJS(Dictionary options); 41 41 }; -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
r202109 r202275 98 98 // Private API used to implement the overloaded operations above. Queued functions are called by 99 99 // runQueuedOperation() (defined in RTCPeerConnectionInternals.js). 100 [Private ] Promise queuedCreateOffer(optional Dictionary offerOptions);101 [Private ] Promise queuedCreateAnswer(optional Dictionary answerOptions);102 [Private ] Promise queuedSetLocalDescription(RTCSessionDescription description);103 [Private ] Promise queuedSetRemoteDescription(RTCSessionDescription description);104 [Private ] Promise queuedAddIceCandidate(RTCIceCandidate candidate);105 [Private ] Promise privateGetStats(MediaStreamTrack? selector);100 [PrivateIdentifier] Promise queuedCreateOffer(optional Dictionary offerOptions); 101 [PrivateIdentifier] Promise queuedCreateAnswer(optional Dictionary answerOptions); 102 [PrivateIdentifier] Promise queuedSetLocalDescription(RTCSessionDescription description); 103 [PrivateIdentifier] Promise queuedSetRemoteDescription(RTCSessionDescription description); 104 [PrivateIdentifier] Promise queuedAddIceCandidate(RTCIceCandidate candidate); 105 [PrivateIdentifier] Promise privateGetStats(MediaStreamTrack? selector); 106 106 107 107 [RaisesException] RTCDataChannel createDataChannel([TreatNullAs=EmptyString] DOMString label, optional Dictionary options); -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
r201988 r202275 385 385 return 1 if $function->signature->extendedAttributes->{"JSBuiltin"}; 386 386 387 return 1 if $function->signature->extendedAttributes->{"Private"}; 388 387 return 1 if $function->signature->extendedAttributes->{"PrivateIdentifier"} and not $function->signature->extendedAttributes->{"PublicIdentifier"}; 389 388 return 0; 390 389 } -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r202268 r202275 1619 1619 push(@functions, @{$interface->iterable->functions}) if $interface->iterable; 1620 1620 foreach my $function (@functions) { 1621 next if ($function->signature->extendedAttributes->{"Private "});1621 next if ($function->signature->extendedAttributes->{"PrivateIdentifier"} and not $function->signature->extendedAttributes->{"PublicIdentifier"}); 1622 1622 next if ($function->isStatic); 1623 1623 next if $function->{overloadIndex} && $function->{overloadIndex} > 1; … … 2296 2296 my $firstPrivateFunction = 1; 2297 2297 foreach my $function (@{$interface->functions}) { 2298 next unless ($function->signature->extendedAttributes->{"Private "});2298 next unless ($function->signature->extendedAttributes->{"PrivateIdentifier"}); 2299 2299 AddToImplIncludes("WebCoreJSClientData.h"); 2300 2300 push(@implContent, " JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData);\n") if $firstPrivateFunction; -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
r201988 r202275 551 551 } 552 552 553 return 1 if $function->signature->extendedAttributes->{"Private "};553 return 1 if $function->signature->extendedAttributes->{"PrivateIdentifier"} and not $function->signature->extendedAttributes->{"PublicIdentifier"}; 554 554 555 555 return 0; -
trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt
r200236 r202275 107 107 OverrideBuiltins 108 108 PassContext 109 Private 109 PrivateIdentifier 110 PublicIdentifier 110 111 PutForwards=* 111 112 RaisesException -
trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
r201988 r202275 1495 1495 } 1496 1496 1497 gchar* webkit_dom_test_obj_public_and_private_method(WebKitDOMTestObj* self, const gchar* argument) 1498 { 1499 WebCore::JSMainThreadNullState state; 1500 g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0); 1501 g_return_val_if_fail(argument, 0); 1502 WebCore::TestObj* item = WebKit::core(self); 1503 WTF::String convertedArgument = WTF::String::fromUTF8(argument); 1504 gchar* result = convertToUTF8String(item->publicAndPrivateMethod(convertedArgument)); 1505 return result; 1506 } 1507 1497 1508 void webkit_dom_test_obj_with_script_state_void(WebKitDOMTestObj* self) 1498 1509 { -
trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
r201988 r202275 395 395 396 396 /** 397 * webkit_dom_test_obj_public_and_private_method: 398 * @self: A #WebKitDOMTestObj 399 * @argument: A #gchar 400 * 401 * Returns: A #gchar 402 * 403 * Stability: Unstable 404 **/ 405 WEBKIT_API gchar* 406 webkit_dom_test_obj_public_and_private_method(WebKitDOMTestObj* self, const gchar* argument); 407 408 /** 397 409 * webkit_dom_test_obj_with_script_state_void: 398 410 * @self: A #WebKitDOMTestObj -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r202268 r202275 608 608 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(JSC::ExecState*); 609 609 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPrivateMethod(JSC::ExecState*); 610 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPublicAndPrivateMethod(JSC::ExecState*); 610 611 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(JSC::ExecState*); 611 612 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(JSC::ExecState*); … … 1061 1062 { 65, -1 }, 1062 1063 { -1, -1 }, 1063 { 13 8, -1 },1064 { 139, -1 }, 1064 1065 { -1, -1 }, 1065 1066 { 21, 513 }, … … 1070 1071 { -1, -1 }, 1071 1072 { 63, -1 }, 1072 { 20 3, -1 },1073 { 18 7, -1 },1073 { 204, -1 }, 1074 { 188, -1 }, 1074 1075 { 56, -1 }, 1075 1076 { -1, -1 }, … … 1077 1078 { -1, -1 }, 1078 1079 { -1, -1 }, 1079 { 14 0, -1 },1080 { -1, -1 }, 1081 { -1, -1 }, 1082 { -1, -1 }, 1083 { -1, -1 }, 1084 { 11 5, -1 },1085 { -1, -1 }, 1086 { 1 29, -1 },1080 { 141, -1 }, 1081 { -1, -1 }, 1082 { -1, -1 }, 1083 { -1, -1 }, 1084 { -1, -1 }, 1085 { 116, -1 }, 1086 { -1, -1 }, 1087 { 130, -1 }, 1087 1088 { -1, -1 }, 1088 1089 { 79, -1 }, … … 1091 1092 { -1, -1 }, 1092 1093 { -1, -1 }, 1093 { 13 2, 533 },1094 { -1, -1 }, 1095 { -1, -1 }, 1096 { -1, -1 }, 1097 { -1, -1 }, 1098 { -1, -1 }, 1099 { -1, -1 }, 1100 { -1, -1 }, 1101 { -1, -1 }, 1102 { 1 49, -1 },1094 { 133, 533 }, 1095 { -1, -1 }, 1096 { -1, -1 }, 1097 { -1, -1 }, 1098 { -1, -1 }, 1099 { -1, -1 }, 1100 { -1, -1 }, 1101 { -1, -1 }, 1102 { -1, -1 }, 1103 { 150, -1 }, 1103 1104 { 34, 525 }, 1104 1105 { -1, -1 }, … … 1108 1109 { -1, -1 }, 1109 1110 { -1, -1 }, 1110 { 170, -1 }, 1111 { -1, -1 }, 1112 { -1, -1 }, 1113 { -1, -1 }, 1111 { 171, -1 }, 1112 { -1, -1 }, 1113 { -1, -1 }, 1114 { -1, -1 }, 1115 { 115, -1 }, 1114 1116 { 114, -1 }, 1115 { 113, -1 },1116 1117 { -1, -1 }, 1117 1118 { -1, -1 }, … … 1126 1127 { -1, -1 }, 1127 1128 { 5, -1 }, 1128 { 17 8, -1 },1129 { 179, -1 }, 1129 1130 { -1, -1 }, 1130 1131 { -1, -1 }, … … 1140 1141 { -1, -1 }, 1141 1142 { -1, -1 }, 1142 { 10 6, -1 },1143 { 107, -1 }, 1143 1144 { 97, -1 }, 1144 1145 { -1, -1 }, … … 1151 1152 { -1, -1 }, 1152 1153 { 9, -1 }, 1153 { 16 4, -1 },1154 { 165, -1 }, 1154 1155 { -1, -1 }, 1155 1156 { -1, -1 }, … … 1157 1158 { 90, -1 }, 1158 1159 { -1, -1 }, 1159 { 15 7, -1 },1160 { 158, -1 }, 1160 1161 { -1, -1 }, 1161 1162 { -1, -1 }, 1162 1163 { 84, -1 }, 1163 { 20 0, -1 },1164 { 201, -1 }, 1164 1165 { -1, -1 }, 1165 1166 { 31, 530 }, … … 1171 1172 { -1, -1 }, 1172 1173 { -1, -1 }, 1173 { 18 4, -1 },1174 { -1, -1 }, 1175 { -1, -1 }, 1176 { 13 1, 547 },1177 { 1 09, -1 },1178 { -1, -1 }, 1179 { -1, -1 }, 1180 { -1, -1 }, 1181 { 15 3, -1 },1174 { 185, -1 }, 1175 { -1, -1 }, 1176 { -1, -1 }, 1177 { 132, 547 }, 1178 { 110, -1 }, 1179 { -1, -1 }, 1180 { -1, -1 }, 1181 { -1, -1 }, 1182 { 154, -1 }, 1182 1183 { -1, -1 }, 1183 1184 { 6, -1 }, 1184 { 13 0, -1 },1185 { 131, -1 }, 1185 1186 { -1, -1 }, 1186 1187 { -1, -1 }, … … 1194 1195 { 1, -1 }, 1195 1196 { -1, -1 }, 1196 { 14 4, -1 },1197 { 145, -1 }, 1197 1198 { 48, -1 }, 1198 1199 { 67, -1 }, 1199 1200 { -1, -1 }, 1200 { 20 1, -1 },1201 { 202, -1 }, 1201 1202 { -1, -1 }, 1202 1203 { -1, -1 }, 1203 1204 { -1, -1 }, 1204 1205 { 39, -1 }, 1205 { 12 4, 532 },1206 { 125, 532 }, 1206 1207 { -1, -1 }, 1207 1208 { 103, -1 }, … … 1211 1212 { -1, -1 }, 1212 1213 { -1, -1 }, 1213 { 17 1, -1 },1214 { 16 3, -1 },1215 { -1, -1 }, 1216 { -1, -1 }, 1217 { -1, -1 }, 1218 { 20 2, -1 },1214 { 172, -1 }, 1215 { 164, -1 }, 1216 { -1, -1 }, 1217 { -1, -1 }, 1218 { -1, -1 }, 1219 { 203, -1 }, 1219 1220 { -1, -1 }, 1220 1221 { -1, -1 }, … … 1222 1223 { -1, -1 }, 1223 1224 { -1, -1 }, 1224 { 14 5, -1 },1225 { -1, -1 },1225 { 146, -1 }, 1226 { 106, -1 }, 1226 1227 { -1, -1 }, 1227 1228 { -1, -1 }, … … 1239 1240 { -1, -1 }, 1240 1241 { -1, -1 }, 1241 { 15 6, -1 },1242 { 14 2, -1 },1243 { -1, -1 }, 1244 { -1, -1 }, 1245 { -1, -1 }, 1246 { -1, -1 }, 1247 { 12 5, -1 },1248 { -1, -1 }, 1249 { -1, -1 }, 1250 { -1, -1 }, 1251 { 18 0, 545 },1242 { 157, -1 }, 1243 { 143, -1 }, 1244 { -1, -1 }, 1245 { -1, -1 }, 1246 { -1, -1 }, 1247 { -1, -1 }, 1248 { 126, -1 }, 1249 { -1, -1 }, 1250 { -1, -1 }, 1251 { -1, -1 }, 1252 { 181, 545 }, 1252 1253 { 99, 541 }, 1253 1254 { -1, -1 }, … … 1293 1294 { 10, 512 }, 1294 1295 { -1, -1 }, 1295 { 17 4, -1 },1296 { 175, -1 }, 1296 1297 { -1, -1 }, 1297 1298 { 75, 543 }, 1298 { 1 79, -1 },1299 { -1, -1 }, 1300 { -1, -1 }, 1301 { -1, -1 }, 1302 { -1, -1 }, 1303 { 11 8, 549 },1304 { -1, -1 }, 1305 { -1, -1 }, 1306 { -1, -1 }, 1307 { 17 5, -1 },1308 { -1, -1 }, 1309 { 11 6, -1 },1299 { 180, -1 }, 1300 { -1, -1 }, 1301 { -1, -1 }, 1302 { -1, -1 }, 1303 { -1, -1 }, 1304 { 119, 549 }, 1305 { -1, -1 }, 1306 { -1, -1 }, 1307 { -1, -1 }, 1308 { 176, -1 }, 1309 { -1, -1 }, 1310 { 117, -1 }, 1310 1311 { -1, -1 }, 1311 1312 { -1, -1 }, … … 1320 1321 { -1, -1 }, 1321 1322 { -1, -1 }, 1322 { 15 2, -1 },1323 { 153, -1 }, 1323 1324 { 100, -1 }, 1324 { 16 1, -1 },1325 { 162, -1 }, 1325 1326 { -1, -1 }, 1326 1327 { -1, -1 }, … … 1332 1333 { -1, -1 }, 1333 1334 { 49, -1 }, 1334 { 18 2, -1 },1335 { 183, -1 }, 1335 1336 { 23, -1 }, 1336 1337 { -1, -1 }, … … 1338 1339 { -1, -1 }, 1339 1340 { -1, -1 }, 1340 { 19 2, -1 },1341 { -1, -1 }, 1342 { -1, -1 }, 1343 { 15 8, -1 },1344 { -1, -1 }, 1345 { -1, -1 }, 1346 { -1, -1 }, 1347 { 11 7, -1 },1348 { -1, -1 }, 1349 { -1, -1 }, 1350 { -1, -1 }, 1351 { -1, -1 }, 1352 { -1, -1 }, 1353 { 17 2, -1 },1354 { 16 7, -1 },1341 { 193, -1 }, 1342 { -1, -1 }, 1343 { -1, -1 }, 1344 { 159, -1 }, 1345 { -1, -1 }, 1346 { -1, -1 }, 1347 { -1, -1 }, 1348 { 118, -1 }, 1349 { -1, -1 }, 1350 { -1, -1 }, 1351 { -1, -1 }, 1352 { -1, -1 }, 1353 { -1, -1 }, 1354 { 173, -1 }, 1355 { 168, -1 }, 1355 1356 { -1, -1 }, 1356 1357 { -1, -1 }, … … 1359 1360 { -1, -1 }, 1360 1361 { -1, -1 }, 1361 { 18 5, -1 },1362 { 186, -1 }, 1362 1363 { -1, -1 }, 1363 1364 { 82, 535 }, … … 1393 1394 { 0, -1 }, 1394 1395 { -1, -1 }, 1395 { 11 2, -1 },1396 { 113, -1 }, 1396 1397 { -1, -1 }, 1397 1398 { -1, -1 }, … … 1402 1403 { -1, -1 }, 1403 1404 { -1, -1 }, 1404 { 14 3, 542 },1405 { 144, 542 }, 1405 1406 { -1, -1 }, 1406 1407 { 50, 546 }, … … 1410 1411 { -1, -1 }, 1411 1412 { -1, -1 }, 1412 { 19 6, 550 },1413 { 197, 550 }, 1413 1414 { 17, -1 }, 1414 1415 { -1, -1 }, … … 1433 1434 { 18, 514 }, 1434 1435 { -1, -1 }, 1435 { 19 3, -1 },1436 { 194, -1 }, 1436 1437 { -1, -1 }, 1437 1438 { 2, 519 }, … … 1441 1442 { -1, -1 }, 1442 1443 { -1, -1 }, 1443 { 10 8, -1 },1444 { 109, -1 }, 1444 1445 { -1, -1 }, 1445 1446 { -1, -1 }, … … 1453 1454 { -1, -1 }, 1454 1455 { 53, 526 }, 1455 { 19 0, -1 },1456 { 191, -1 }, 1456 1457 { -1, -1 }, 1457 1458 { -1, -1 }, 1458 1459 { 74, -1 }, 1459 { 19 8, -1 },1460 { -1, -1 }, 1461 { -1, -1 }, 1462 { 12 2, 540 },1463 { -1, -1 }, 1464 { 12 7, -1 },1465 { -1, -1 }, 1466 { -1, -1 }, 1467 { -1, -1 }, 1468 { 13 6, -1 },1460 { 199, -1 }, 1461 { -1, -1 }, 1462 { -1, -1 }, 1463 { 123, 540 }, 1464 { -1, -1 }, 1465 { 128, -1 }, 1466 { -1, -1 }, 1467 { -1, -1 }, 1468 { -1, -1 }, 1469 { 137, -1 }, 1469 1470 { 19, -1 }, 1470 1471 { 25, 544 }, 1471 { 13 7, -1 },1472 { -1, -1 }, 1473 { -1, -1 }, 1474 { 13 3, -1 },1472 { 138, -1 }, 1473 { -1, -1 }, 1474 { -1, -1 }, 1475 { 134, -1 }, 1475 1476 { -1, -1 }, 1476 1477 { -1, -1 }, … … 1478 1479 { -1, -1 }, 1479 1480 { 101, -1 }, 1480 { 18 1, -1 },1481 { -1, -1 }, 1482 { -1, -1 }, 1483 { -1, -1 }, 1484 { 14 8, -1 },1481 { 182, -1 }, 1482 { -1, -1 }, 1483 { -1, -1 }, 1484 { -1, -1 }, 1485 { 149, -1 }, 1485 1486 { -1, -1 }, 1486 1487 { 16, -1 }, … … 1491 1492 { 96, -1 }, 1492 1493 { -1, -1 }, 1493 { 1 59, -1 },1494 { 160, -1 }, 1494 1495 { -1, -1 }, 1495 1496 { -1, -1 }, … … 1503 1504 { -1, -1 }, 1504 1505 { -1, -1 }, 1505 { 19 1, -1 },1506 { 192, -1 }, 1506 1507 { 68, -1 }, 1507 1508 { -1, -1 }, 1508 1509 { 80, -1 }, 1509 { 17 6, -1 },1510 { 177, -1 }, 1510 1511 { -1, -1 }, 1511 1512 { -1, -1 }, … … 1518 1519 { -1, -1 }, 1519 1520 { -1, -1 }, 1520 { 12 0, 528 },1521 { 121, 528 }, 1521 1522 { 37, -1 }, 1522 1523 { -1, -1 }, 1523 { 12 3, -1 },1524 { 124, -1 }, 1524 1525 { 52, 536 }, 1525 1526 { -1, -1 }, … … 1528 1529 { 59, -1 }, 1529 1530 { -1, -1 }, 1530 { 18 8, -1 },1531 { 189, -1 }, 1531 1532 { -1, -1 }, 1532 1533 { 105, -1 }, … … 1542 1543 { 15, 516 }, 1543 1544 { 55, -1 }, 1544 { 1 19, 534 },1545 { 120, 534 }, 1545 1546 { -1, -1 }, 1546 1547 { 7, 537 }, 1547 1548 { -1, -1 }, 1548 1549 { -1, -1 }, 1549 { 12 1, -1 },1550 { 122, -1 }, 1550 1551 { 81, 523 }, 1551 1552 { -1, -1 }, 1552 { 16 6, -1 },1553 { 167, -1 }, 1553 1554 { 89, -1 }, 1554 1555 { -1, -1 }, 1555 1556 { -1, -1 }, 1556 1557 { -1, -1 }, 1557 { 16 0, -1 },1558 { 161, -1 }, 1558 1559 { -1, -1 }, 1559 1560 { 12, 520 }, … … 1570 1571 { 95, -1 }, 1571 1572 { 102, -1 }, 1572 { 107, -1 }, 1573 { 110, -1 }, 1573 { 108, -1 }, 1574 1574 { 111, -1 }, 1575 { 1 26, -1 },1576 { 12 8, -1 },1577 { 1 34, -1 },1575 { 112, -1 }, 1576 { 127, -1 }, 1577 { 129, -1 }, 1578 1578 { 135, -1 }, 1579 { 13 9, -1 },1580 { 14 1, -1 },1581 { 14 6, -1 },1579 { 136, -1 }, 1580 { 140, -1 }, 1581 { 142, -1 }, 1582 1582 { 147, -1 }, 1583 { 1 50, -1 },1583 { 148, -1 }, 1584 1584 { 151, -1 }, 1585 { 15 4, -1 },1585 { 152, -1 }, 1586 1586 { 155, -1 }, 1587 { 1 62, -1 },1588 { 16 5, -1 },1589 { 16 8, -1 },1587 { 156, -1 }, 1588 { 163, -1 }, 1589 { 166, -1 }, 1590 1590 { 169, -1 }, 1591 { 17 3, -1 },1592 { 17 7, -1 },1593 { 1 83, -1 },1594 { 18 6, -1 },1595 { 18 9, -1 },1596 { 19 4, -1 },1591 { 170, -1 }, 1592 { 174, -1 }, 1593 { 178, -1 }, 1594 { 184, -1 }, 1595 { 187, -1 }, 1596 { 190, -1 }, 1597 1597 { 195, -1 }, 1598 { 197, -1 }, 1599 { 199, -1 }, 1598 { 196, -1 }, 1599 { 198, -1 }, 1600 { 200, -1 }, 1600 1601 }; 1601 1602 … … 1745 1746 { 0, 0, NoIntrinsic, { 0, 0 } }, 1746 1747 #endif 1748 { "publicAndPrivateMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionPublicAndPrivateMethod), (intptr_t) (1) } }, 1747 1749 { "addEventListener", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAddEventListener), (intptr_t) (2) } }, 1748 1750 { "removeEventListener", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionRemoveEventListener), (intptr_t) (2) } }, … … 1861 1863 }; 1862 1864 1863 static const HashTable JSTestObjPrototypeTable = { 20 4, 511, true, JSTestObjPrototypeTableValues, JSTestObjPrototypeTableIndex };1865 static const HashTable JSTestObjPrototypeTable = { 205, 511, true, JSTestObjPrototypeTableValues, JSTestObjPrototypeTableIndex }; 1864 1866 const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, &JSTestObjPrototypeTable, CREATE_METHOD_TABLE(JSTestObjPrototype) }; 1865 1867 … … 1884 1886 JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData); 1885 1887 putDirect(vm, clientData.builtinNames().privateMethodPrivateName(), JSFunction::create(vm, globalObject(), 0, String(), jsTestObjPrototypeFunctionPrivateMethod), ReadOnly | DontEnum); 1888 putDirect(vm, clientData.builtinNames().publicAndPrivateMethodPrivateName(), JSFunction::create(vm, globalObject(), 0, String(), jsTestObjPrototypeFunctionPublicAndPrivateMethod), ReadOnly | DontEnum); 1886 1889 putDirect(vm, vm.propertyNames->iteratorSymbol, JSFunction::create(vm, globalObject(), 0, ASCIILiteral("[Symbol.Iterator]"), jsTestObjPrototypeFunctionSymbolIterator), ReadOnly | DontEnum); 1887 1890 } … … 4942 4945 return JSValue::encode(jsUndefined()); 4943 4946 JSValue result = jsStringWithCache(state, impl.privateMethod(WTFMove(argument))); 4947 return JSValue::encode(result); 4948 } 4949 4950 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionPublicAndPrivateMethod(ExecState* state) 4951 { 4952 JSValue thisValue = state->thisValue(); 4953 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 4954 if (UNLIKELY(!castedThis)) 4955 return throwThisTypeError(*state, "TestObj", "publicAndPrivateMethod"); 4956 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 4957 auto& impl = castedThis->wrapped(); 4958 if (UNLIKELY(state->argumentCount() < 1)) 4959 return throwVMError(state, createNotEnoughArgumentsError(state)); 4960 auto argument = state->argument(0).toWTFString(state); 4961 if (UNLIKELY(state->hadException())) 4962 return JSValue::encode(jsUndefined()); 4963 JSValue result = jsStringWithCache(state, impl.publicAndPrivateMethod(WTFMove(argument))); 4944 4964 return JSValue::encode(result); 4945 4965 } -
trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
r201988 r202275 164 164 - (void)customMethod; 165 165 - (void)customMethodWithArgs:(int)longArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg; 166 - (NSString *)publicAndPrivateMethod:(NSString *)argument; 166 167 - (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture; 167 168 - (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture; -
trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
r201988 r202275 1239 1239 #endif 1240 1240 1241 - (NSString *)publicAndPrivateMethod:(NSString *)argument 1242 { 1243 WebCore::JSMainThreadNullState state; 1244 return IMPL->publicAndPrivateMethod(argument); 1245 } 1246 1241 1247 - (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture 1242 1248 { -
trunk/Source/WebCore/bindings/scripts/test/TestObj.idl
r201237 r202275 151 151 152 152 // Private extended attribute 153 [Private] DOMString privateMethod(DOMString argument); 153 [PrivateIdentifier] DOMString privateMethod(DOMString argument); 154 [PrivateIdentifier, PublicIdentifier] DOMString publicAndPrivateMethod(DOMString argument); 154 155 155 156 void addEventListener(DOMString type, EventListener listener, optional boolean useCapture = false);
Note: See TracChangeset
for help on using the changeset viewer.