Changeset 117961 in webkit
- Timestamp:
- May 22, 2012 6:07:14 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117960 r117961 1 2012-05-22 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: annotate InjectedScriptSource.js for closure compiler 4 https://bugs.webkit.org/show_bug.cgi?id=87120 5 6 Reviewed by Pavel Feldman. 7 8 Annotated InjectedScriptSource.js for closure compiler. Replaced call of undefined 9 _isPrimitiveValue function with isPrimitiveValue. 10 11 * inspector/InjectedScriptExterns.js: Added. External APIs used in InjectedScriptSource.js 12 (console.log): 13 (InjectedScriptHost.prototype.storageId): 14 (InjectedScriptHost.prototype.functionDetails): 15 (InjectedScriptHost.prototype.isHTMLAllCollection): 16 (InjectedScriptHost.prototype.internalConstructorName): 17 (InjectedScriptHost.prototype.copyText): 18 (InjectedScriptHost.prototype.clearConsoleMessages): 19 (InjectedScriptHost.prototype.inspectedObject): 20 (InjectedScriptHost.prototype.databaseId): 21 (InjectedScriptHost.prototype.inspect): 22 (InjectedScriptHost.prototype.type): 23 (InjectedScriptHost.prototype.getEventListeners): 24 (JavaScriptCallFrame.prototype.scopeType): 25 * inspector/InjectedScriptSource.js: 26 1 27 2012-05-22 Ian Vollick <vollick@chromium.org> 2 28 -
trunk/Source/WebCore/inspector/InjectedScriptSource.js
r117599 r117961 27 27 */ 28 28 29 /** 30 * @param {InjectedScriptHost} InjectedScriptHost 31 */ 29 32 (function (InjectedScriptHost, inspectedWindow, injectedScriptId) { 30 33 31 function bind(thisObject, memberFunction) 32 { 33 var func = memberFunction; 34 var args = Array.prototype.slice.call(arguments, 2); 35 function bound() 36 { 37 return func.apply(thisObject, args.concat(Array.prototype.slice.call(arguments, 0))); 38 } 39 bound.toString = function() { 40 return "bound: " + func; 41 }; 42 return bound; 43 } 44 34 /** 35 * @constructor 36 */ 45 37 var InjectedScript = function() 46 38 { … … 72 64 var result = {}; 73 65 result.type = typeof object; 74 if (this. _isPrimitiveValue(object))66 if (this.isPrimitiveValue(object)) 75 67 result.value = object; 76 68 else … … 225 217 var descriptors = []; 226 218 var nameProcessed = {}; 227 nameProcessed .__proto__= null;219 nameProcessed["__proto__"] = null; 228 220 for (var o = object; this._isDefined(o); o = o.__proto__) { 229 221 var names = Object.getOwnPropertyNames(o); … … 279 271 args = eval(args); 280 272 for (var i = 0; i < args.length; ++i) { 281 varobjectId = args[i].objectId;273 objectId = args[i].objectId; 282 274 if (objectId) { 283 275 var parsedArgId = this._parseObjectId(objectId); … … 373 365 { 374 366 var parsedCallFrameId = eval("(" + callFrameId + ")"); 375 var ordinal = parsedCallFrameId .ordinal;367 var ordinal = parsedCallFrameId["ordinal"]; 376 368 var callFrame = topCallFrame; 377 369 while (--ordinal >= 0 && callFrame) … … 483 475 var injectedScript = new InjectedScript(); 484 476 477 /** 478 * @constructor 479 * @param {*} object 480 * @param {string=} objectGroupName 481 * @param {boolean=} forceValueType 482 */ 485 483 InjectedScript.RemoteObject = function(object, objectGroupName, forceValueType) 486 484 { … … 509 507 } 510 508 509 /** 510 * @constructor 511 * @param {number} ordinal 512 */ 511 513 InjectedScript.CallFrameProxy = function(ordinal, callFrame) 512 514 { … … 549 551 } 550 552 553 /** 554 * @constructor 555 */ 551 556 function CommandLineAPI(commandLineAPIImpl, callFrame) 552 557 { … … 569 574 continue; 570 575 571 this[member] = bind(commandLineAPIImpl, commandLineAPIImpl[member]);576 this[member] = commandLineAPIImpl[member].bind(commandLineAPIImpl); 572 577 } 573 578 … … 577 582 continue; 578 583 579 this.__defineGetter__("$" + i, bind(commandLineAPIImpl, commandLineAPIImpl._inspectedObject, i));584 this.__defineGetter__("$" + i, commandLineAPIImpl._inspectedObject.bind(commandLineAPIImpl, i)); 580 585 } 581 586 } … … 586 591 ]; 587 592 593 /** 594 * @constructor 595 */ 588 596 function CommandLineAPIImpl() 589 597 { -
trunk/Source/WebCore/inspector/compile-front-end.sh
r110550 r117961 33 33 python Source/WebCore/inspector/compile-front-end.py 34 34 35 echo "Compiling InjectedScriptSource.js..." 36 java -jar ~/closure/compiler.jar\ 37 --summary_detail_level 3\ 38 --compilation_level SIMPLE_OPTIMIZATIONS\ 39 --warning_level VERBOSE\ 40 --language_in ECMASCRIPT5\ 41 --accept_const_keyword\ 42 --js Source/WebCore/inspector/InjectedScriptSource.js\ 43 --externs Source/WebCore/inspector/InjectedScriptExterns.js
Note: See TracChangeset
for help on using the changeset viewer.