Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: src/inspector/injected-script-source.js

Issue 2801763002: [inspector] fixed injected-script-host crash (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/inspector/v8-injected-script-host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 name = /** @type {string} */ (injectedScript._describe(prope rty)); 396 name = /** @type {string} */ (injectedScript._describe(prope rty));
397 else 397 else
398 name = typeof property === "number" ? ("" + property) : /** @type {string} */(property); 398 name = typeof property === "number" ? ("" + property) : /** @type {string} */(property);
399 399
400 if (subtype === "internal#scopeList" && name === "length") 400 if (subtype === "internal#scopeList" && name === "length")
401 continue; 401 continue;
402 402
403 var descriptor; 403 var descriptor;
404 try { 404 try {
405 descriptor = InjectedScriptHost.getOwnPropertyDescriptor(o, property); 405 descriptor = InjectedScriptHost.getOwnPropertyDescriptor(o, property);
406 InjectedScriptHost.nullifyPrototype(descriptor); 406 if (descriptor) {
407 InjectedScriptHost.nullifyPrototype(descriptor);
408 }
407 var isAccessorProperty = descriptor && ("get" in descriptor || "set" in descriptor); 409 var isAccessorProperty = descriptor && ("get" in descriptor || "set" in descriptor);
408 if (accessorPropertiesOnly && !isAccessorProperty) 410 if (accessorPropertiesOnly && !isAccessorProperty)
409 continue; 411 continue;
410 if (descriptor && "get" in descriptor && "set" in descriptor && name !== "__proto__" && 412 if (descriptor && "get" in descriptor && "set" in descriptor && name !== "__proto__" &&
411 InjectedScriptHost.formatAccessorsAsProperties(objec t, descriptor.get) && 413 InjectedScriptHost.formatAccessorsAsProperties(objec t, descriptor.get) &&
412 !doesAttributeHaveObservableSideEffectOnGet(object, name)) { 414 !doesAttributeHaveObservableSideEffectOnGet(object, name)) {
413 descriptor.value = object[property]; 415 descriptor.value = object[property];
414 descriptor.isOwn = true; 416 descriptor.isOwn = true;
415 delete descriptor.get; 417 delete descriptor.get;
416 delete descriptor.set; 418 delete descriptor.set;
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf); 1067 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf);
1066 } 1068 }
1067 return string.substr(0, maxLength) + "\u2026"; 1069 return string.substr(0, maxLength) + "\u2026";
1068 }, 1070 },
1069 1071
1070 __proto__: null 1072 __proto__: null
1071 } 1073 }
1072 1074
1073 return injectedScript; 1075 return injectedScript;
1074 }) 1076 })
OLDNEW
« no previous file with comments | « no previous file | src/inspector/v8-injected-script-host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698