OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 Sources.SourceMapNamesResolver = {}; | 4 Sources.SourceMapNamesResolver = {}; |
5 | 5 |
6 Sources.SourceMapNamesResolver._cachedMapSymbol = Symbol('cache'); | 6 Sources.SourceMapNamesResolver._cachedMapSymbol = Symbol('cache'); |
7 Sources.SourceMapNamesResolver._cachedIdentifiersSymbol = Symbol('cachedIdentifi
ers'); | 7 Sources.SourceMapNamesResolver._cachedIdentifiersSymbol = Symbol('cachedIdentifi
ers'); |
8 | 8 |
9 /** | 9 /** |
10 * @unrestricted | 10 * @unrestricted |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 /** | 396 /** |
397 * @override | 397 * @override |
398 * @return {number} | 398 * @return {number} |
399 */ | 399 */ |
400 arrayLength() { | 400 arrayLength() { |
401 return this._object.arrayLength(); | 401 return this._object.arrayLength(); |
402 } | 402 } |
403 | 403 |
404 /** | 404 /** |
405 * @override | 405 * @override |
| 406 * @param {boolean} generatePreview |
406 * @param {function(?Array.<!SDK.RemoteObjectProperty>, ?Array.<!SDK.RemoteObj
ectProperty>)} callback | 407 * @param {function(?Array.<!SDK.RemoteObjectProperty>, ?Array.<!SDK.RemoteObj
ectProperty>)} callback |
407 */ | 408 */ |
408 getOwnProperties(callback) { | 409 getOwnProperties(generatePreview, callback) { |
409 this._object.getOwnProperties(callback); | 410 this._object.getOwnProperties(generatePreview, callback); |
410 } | 411 } |
411 | 412 |
412 /** | 413 /** |
413 * @override | 414 * @override |
414 * @param {boolean} accessorPropertiesOnly | 415 * @param {boolean} accessorPropertiesOnly |
| 416 * @param {boolean} generatePreview |
415 * @param {function(?Array<!SDK.RemoteObjectProperty>, ?Array<!SDK.RemoteObjec
tProperty>)} callback | 417 * @param {function(?Array<!SDK.RemoteObjectProperty>, ?Array<!SDK.RemoteObjec
tProperty>)} callback |
416 */ | 418 */ |
417 getAllProperties(accessorPropertiesOnly, callback) { | 419 getAllProperties(accessorPropertiesOnly, generatePreview, callback) { |
418 /** | 420 /** |
419 * @param {?Array.<!SDK.RemoteObjectProperty>} properties | 421 * @param {?Array.<!SDK.RemoteObjectProperty>} properties |
420 * @param {?Array.<!SDK.RemoteObjectProperty>} internalProperties | 422 * @param {?Array.<!SDK.RemoteObjectProperty>} internalProperties |
421 * @this {Sources.SourceMapNamesResolver.RemoteObject} | 423 * @this {Sources.SourceMapNamesResolver.RemoteObject} |
422 */ | 424 */ |
423 function wrappedCallback(properties, internalProperties) { | 425 function wrappedCallback(properties, internalProperties) { |
424 Sources.SourceMapNamesResolver._resolveScope(this._scope) | 426 Sources.SourceMapNamesResolver._resolveScope(this._scope) |
425 .then(resolveNames.bind(null, properties, internalProperties)); | 427 .then(resolveNames.bind(null, properties, internalProperties)); |
426 } | 428 } |
427 | 429 |
(...skipping 10 matching lines...) Expand all Loading... |
438 var name = namesMapping.get(property.name) || properties[i].name; | 440 var name = namesMapping.get(property.name) || properties[i].name; |
439 newProperties.push(new SDK.RemoteObjectProperty( | 441 newProperties.push(new SDK.RemoteObjectProperty( |
440 name, property.value, property.enumerable, property.writable, prop
erty.isOwn, property.wasThrown, | 442 name, property.value, property.enumerable, property.writable, prop
erty.isOwn, property.wasThrown, |
441 property.symbol, property.synthetic)); | 443 property.symbol, property.synthetic)); |
442 } | 444 } |
443 } | 445 } |
444 | 446 |
445 callback(newProperties, internalProperties); | 447 callback(newProperties, internalProperties); |
446 } | 448 } |
447 | 449 |
448 this._object.getAllProperties(accessorPropertiesOnly, wrappedCallback.bind(t
his)); | 450 this._object.getAllProperties(accessorPropertiesOnly, generatePreview, wrapp
edCallback.bind(this)); |
449 } | 451 } |
450 | 452 |
451 /** | 453 /** |
452 * @override | 454 * @override |
453 * @param {string|!Protocol.Runtime.CallArgument} argumentName | 455 * @param {string|!Protocol.Runtime.CallArgument} argumentName |
454 * @param {string} value | 456 * @param {string} value |
455 * @param {function(string=)} callback | 457 * @param {function(string=)} callback |
456 */ | 458 */ |
457 setPropertyValue(argumentName, value, callback) { | 459 setPropertyValue(argumentName, value, callback) { |
458 Sources.SourceMapNamesResolver._resolveScope(this._scope).then(resolveName.b
ind(this)); | 460 Sources.SourceMapNamesResolver._resolveScope(this._scope).then(resolveName.b
ind(this)); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 } | 535 } |
534 | 536 |
535 /** | 537 /** |
536 * @override | 538 * @override |
537 * @return {boolean} | 539 * @return {boolean} |
538 */ | 540 */ |
539 isNode() { | 541 isNode() { |
540 return this._object.isNode(); | 542 return this._object.isNode(); |
541 } | 543 } |
542 }; | 544 }; |
OLD | NEW |