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

Side by Side Diff: test/cctest/test-api.cc

Issue 1590273002: [runtime] No need to carry around the creation context for JSBoundFunctions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix debug. Created 4 years, 11 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/profiler/heap-snapshot-generator.cc ('k') | no next file » | 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 19655 matching lines...) Expand 10 before | Expand all | Expand 10 after
19666 .FromJust()); 19666 .FromJust());
19667 bound_function1 = CompileRun("foo.bind(1)").As<Function>(); 19667 bound_function1 = CompileRun("foo.bind(1)").As<Function>();
19668 bound_function2 = 19668 bound_function2 =
19669 CompileRun("Function.prototype.bind.call(foo, 2)").As<Function>(); 19669 CompileRun("Function.prototype.bind.call(foo, 2)").As<Function>();
19670 } 19670 }
19671 19671
19672 Local<Context> other_context = Context::New(CcTest::isolate()); 19672 Local<Context> other_context = Context::New(CcTest::isolate());
19673 Context::Scope scope(other_context); 19673 Context::Scope scope(other_context);
19674 CHECK(bound_function1->CreationContext() == context1); 19674 CHECK(bound_function1->CreationContext() == context1);
19675 CheckContextId(bound_function1, 1); 19675 CheckContextId(bound_function1, 1);
19676 CHECK(bound_function2->CreationContext() == context2); 19676 CHECK(bound_function2->CreationContext() == context1);
19677 CheckContextId(bound_function2, 1); 19677 CheckContextId(bound_function2, 1);
19678 } 19678 }
19679 19679
19680 19680
19681 void HasOwnPropertyIndexedPropertyGetter( 19681 void HasOwnPropertyIndexedPropertyGetter(
19682 uint32_t index, 19682 uint32_t index,
19683 const v8::PropertyCallbackInfo<v8::Value>& info) { 19683 const v8::PropertyCallbackInfo<v8::Value>& info) {
19684 if (index == 42) info.GetReturnValue().Set(v8_str("yes")); 19684 if (index == 42) info.GetReturnValue().Set(v8_str("yes"));
19685 } 19685 }
19686 19686
(...skipping 4655 matching lines...) Expand 10 before | Expand all | Expand 10 after
24342 CHECK(proxy->GetTarget()->SameValue(target)); 24342 CHECK(proxy->GetTarget()->SameValue(target));
24343 CHECK(proxy->GetHandler()->SameValue(handler)); 24343 CHECK(proxy->GetHandler()->SameValue(handler));
24344 24344
24345 proxy->Revoke(); 24345 proxy->Revoke();
24346 CHECK(proxy->IsProxy()); 24346 CHECK(proxy->IsProxy());
24347 CHECK(!target->IsProxy()); 24347 CHECK(!target->IsProxy());
24348 CHECK(proxy->IsRevoked()); 24348 CHECK(proxy->IsRevoked());
24349 CHECK(proxy->GetTarget()->SameValue(target)); 24349 CHECK(proxy->GetTarget()->SameValue(target));
24350 CHECK(proxy->GetHandler()->IsNull()); 24350 CHECK(proxy->GetHandler()->IsNull());
24351 } 24351 }
OLDNEW
« no previous file with comments | « src/profiler/heap-snapshot-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698