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

Side by Side Diff: src/object-observe.js

Issue 23464058: Allow implicit conversion of acceptList values to string during Object.observe (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: cr changes Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/harmony/object-observe.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 function AcceptArgIsValid(arg) { 278 function AcceptArgIsValid(arg) {
279 if (IS_UNDEFINED(arg)) 279 if (IS_UNDEFINED(arg))
280 return true; 280 return true;
281 281
282 if (!IS_SPEC_OBJECT(arg) || 282 if (!IS_SPEC_OBJECT(arg) ||
283 !IS_NUMBER(arg.length) || 283 !IS_NUMBER(arg.length) ||
284 arg.length < 0) 284 arg.length < 0)
285 return false; 285 return false;
286 286
287 var length = arg.length;
288 for (var i = 0; i < length; i++) {
289 if (!IS_STRING(arg[i]))
290 return false;
291 }
292 return true; 287 return true;
293 } 288 }
294 289
295 // CallbackInfo's optimized state is just a number which represents its global 290 // CallbackInfo's optimized state is just a number which represents its global
296 // priority. When a change record must be enqueued for the callback, it 291 // priority. When a change record must be enqueued for the callback, it
297 // normalizes. When delivery clears any pending change records, it re-optimizes. 292 // normalizes. When delivery clears any pending change records, it re-optimizes.
298 function CallbackInfoGet(callback) { 293 function CallbackInfoGet(callback) {
299 return callbackInfoMap.get(callback); 294 return callbackInfoMap.get(callback);
300 } 295 }
301 296
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 "observe", ArrayObserve, 559 "observe", ArrayObserve,
565 "unobserve", ArrayUnobserve 560 "unobserve", ArrayUnobserve
566 )); 561 ));
567 InstallFunctions(notifierPrototype, DONT_ENUM, $Array( 562 InstallFunctions(notifierPrototype, DONT_ENUM, $Array(
568 "notify", ObjectNotifierNotify, 563 "notify", ObjectNotifierNotify,
569 "performChange", ObjectNotifierPerformChange 564 "performChange", ObjectNotifierPerformChange
570 )); 565 ));
571 } 566 }
572 567
573 SetupObjectObserve(); 568 SetupObjectObserve();
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698