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

Side by Side Diff: src/runtime/runtime-collections.cc

Issue 1909433003: Remove support for Object.observe (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 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 | « src/runtime/runtime.h ('k') | src/runtime/runtime-internal.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 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 4
5 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/conversions-inl.h" 8 #include "src/conversions-inl.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 10
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 DisallowHeapAllocation no_gc; 361 DisallowHeapAllocation no_gc;
362 int count = 0; 362 int count = 0;
363 for (int i = 0; count < max_values && i < table->Capacity(); i++) { 363 for (int i = 0; count < max_values && i < table->Capacity(); i++) {
364 Handle<Object> key(table->KeyAt(i), isolate); 364 Handle<Object> key(table->KeyAt(i), isolate);
365 if (table->IsKey(*key)) values->set(count++, *key); 365 if (table->IsKey(*key)) values->set(count++, *key);
366 } 366 }
367 DCHECK_EQ(max_values, count); 367 DCHECK_EQ(max_values, count);
368 } 368 }
369 return *isolate->factory()->NewJSArrayWithElements(values); 369 return *isolate->factory()->NewJSArrayWithElements(values);
370 } 370 }
371
372
373 RUNTIME_FUNCTION(Runtime_ObservationWeakMapCreate) {
374 HandleScope scope(isolate);
375 DCHECK(args.length() == 0);
376 Handle<JSWeakMap> weakmap = isolate->factory()->NewJSWeakMap();
377 JSWeakCollection::Initialize(weakmap, isolate);
378 return *weakmap;
379 }
380 } // namespace internal 371 } // namespace internal
381 } // namespace v8 372 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698