| OLD | NEW |
| 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 7661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7672 | 7672 |
| 7673 | 7673 |
| 7674 v8::Local<Function> args_fun; | 7674 v8::Local<Function> args_fun; |
| 7675 | 7675 |
| 7676 | 7676 |
| 7677 static void ArgumentsTestCallback( | 7677 static void ArgumentsTestCallback( |
| 7678 const v8::FunctionCallbackInfo<v8::Value>& args) { | 7678 const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 7679 ApiTestFuzzer::Fuzz(); | 7679 ApiTestFuzzer::Fuzz(); |
| 7680 v8::Isolate* isolate = args.GetIsolate(); | 7680 v8::Isolate* isolate = args.GetIsolate(); |
| 7681 Local<Context> context = isolate->GetCurrentContext(); | 7681 Local<Context> context = isolate->GetCurrentContext(); |
| 7682 CHECK(args_fun->Equals(context, args.Callee()).FromJust()); | |
| 7683 CHECK_EQ(3, args.Length()); | 7682 CHECK_EQ(3, args.Length()); |
| 7684 CHECK(v8::Integer::New(isolate, 1)->Equals(context, args[0]).FromJust()); | 7683 CHECK(v8::Integer::New(isolate, 1)->Equals(context, args[0]).FromJust()); |
| 7685 CHECK(v8::Integer::New(isolate, 2)->Equals(context, args[1]).FromJust()); | 7684 CHECK(v8::Integer::New(isolate, 2)->Equals(context, args[1]).FromJust()); |
| 7686 CHECK(v8::Integer::New(isolate, 3)->Equals(context, args[2]).FromJust()); | 7685 CHECK(v8::Integer::New(isolate, 3)->Equals(context, args[2]).FromJust()); |
| 7687 CHECK(v8::Undefined(isolate)->Equals(context, args[3]).FromJust()); | 7686 CHECK(v8::Undefined(isolate)->Equals(context, args[3]).FromJust()); |
| 7688 v8::HandleScope scope(args.GetIsolate()); | 7687 v8::HandleScope scope(args.GetIsolate()); |
| 7689 CcTest::heap()->CollectAllGarbage(); | 7688 CcTest::heap()->CollectAllGarbage(); |
| 7690 } | 7689 } |
| 7691 | 7690 |
| 7692 | 7691 |
| (...skipping 14228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21921 class ApiCallOptimizationChecker { | 21920 class ApiCallOptimizationChecker { |
| 21922 private: | 21921 private: |
| 21923 static Local<Object> data; | 21922 static Local<Object> data; |
| 21924 static Local<Object> receiver; | 21923 static Local<Object> receiver; |
| 21925 static Local<Object> holder; | 21924 static Local<Object> holder; |
| 21926 static Local<Object> callee; | 21925 static Local<Object> callee; |
| 21927 static int count; | 21926 static int count; |
| 21928 | 21927 |
| 21929 static void OptimizationCallback( | 21928 static void OptimizationCallback( |
| 21930 const v8::FunctionCallbackInfo<v8::Value>& info) { | 21929 const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 21931 CHECK(callee == info.Callee()); | |
| 21932 CHECK(data == info.Data()); | 21930 CHECK(data == info.Data()); |
| 21933 CHECK(receiver == info.This()); | 21931 CHECK(receiver == info.This()); |
| 21934 if (info.Length() == 1) { | 21932 if (info.Length() == 1) { |
| 21935 CHECK(v8_num(1) | 21933 CHECK(v8_num(1) |
| 21936 ->Equals(info.GetIsolate()->GetCurrentContext(), info[0]) | 21934 ->Equals(info.GetIsolate()->GetCurrentContext(), info[0]) |
| 21937 .FromJust()); | 21935 .FromJust()); |
| 21938 } | 21936 } |
| 21939 CHECK(holder == info.Holder()); | 21937 CHECK(holder == info.Holder()); |
| 21940 count++; | 21938 count++; |
| 21941 info.GetReturnValue().Set(v8_str("returned")); | 21939 info.GetReturnValue().Set(v8_str("returned")); |
| (...skipping 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24344 CHECK(proxy->GetTarget()->SameValue(target)); | 24342 CHECK(proxy->GetTarget()->SameValue(target)); |
| 24345 CHECK(proxy->GetHandler()->SameValue(handler)); | 24343 CHECK(proxy->GetHandler()->SameValue(handler)); |
| 24346 | 24344 |
| 24347 proxy->Revoke(); | 24345 proxy->Revoke(); |
| 24348 CHECK(proxy->IsProxy()); | 24346 CHECK(proxy->IsProxy()); |
| 24349 CHECK(!target->IsProxy()); | 24347 CHECK(!target->IsProxy()); |
| 24350 CHECK(proxy->IsRevoked()); | 24348 CHECK(proxy->IsRevoked()); |
| 24351 CHECK(proxy->GetTarget()->SameValue(target)); | 24349 CHECK(proxy->GetTarget()->SameValue(target)); |
| 24352 CHECK(proxy->GetHandler()->IsNull()); | 24350 CHECK(proxy->GetHandler()->IsNull()); |
| 24353 } | 24351 } |
| OLD | NEW |