| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 // other functions e.g. "get length". | 1484 // other functions e.g. "get length". |
| 1485 CHECK_LE(1, barNode->GetChildrenCount()); | 1485 CHECK_LE(1, barNode->GetChildrenCount()); |
| 1486 CHECK_GE(2, barNode->GetChildrenCount()); | 1486 CHECK_GE(2, barNode->GetChildrenCount()); |
| 1487 GetChild(env->GetIsolate(), barNode, "foo"); | 1487 GetChild(env->GetIsolate(), barNode, "foo"); |
| 1488 | 1488 |
| 1489 profile->Delete(); | 1489 profile->Delete(); |
| 1490 } | 1490 } |
| 1491 | 1491 |
| 1492 | 1492 |
| 1493 static void CallJsFunction2(const v8::FunctionCallbackInfo<v8::Value>& info) { | 1493 static void CallJsFunction2(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 1494 i::OS::Print("In CallJsFunction2\n"); |
| 1494 CallJsFunction(info); | 1495 CallJsFunction(info); |
| 1495 } | 1496 } |
| 1496 | 1497 |
| 1497 | 1498 |
| 1498 static const char* js_native1_js_native2_js_test_source = | 1499 static const char* js_native1_js_native2_js_test_source = |
| 1499 "var is_profiling = false;\n" | 1500 "var is_profiling = false;\n" |
| 1500 "function foo(iterations) {\n" | 1501 "function foo(iterations) {\n" |
| 1501 " if (!is_profiling) {\n" | 1502 " if (!is_profiling) {\n" |
| 1502 " is_profiling = true;\n" | 1503 " is_profiling = true;\n" |
| 1503 " startProfiling('my_profile');\n" | 1504 " startProfiling('my_profile');\n" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1727 inner_profile = NULL; | 1728 inner_profile = NULL; |
| 1728 CHECK_EQ(0, iprofiler->GetProfilesCount()); | 1729 CHECK_EQ(0, iprofiler->GetProfilesCount()); |
| 1729 | 1730 |
| 1730 v8::CpuProfile* outer_profile = profiler->StopProfiling(outer); | 1731 v8::CpuProfile* outer_profile = profiler->StopProfiling(outer); |
| 1731 CHECK(outer_profile); | 1732 CHECK(outer_profile); |
| 1732 CHECK_EQ(1, iprofiler->GetProfilesCount()); | 1733 CHECK_EQ(1, iprofiler->GetProfilesCount()); |
| 1733 outer_profile->Delete(); | 1734 outer_profile->Delete(); |
| 1734 outer_profile = NULL; | 1735 outer_profile = NULL; |
| 1735 CHECK_EQ(0, iprofiler->GetProfilesCount()); | 1736 CHECK_EQ(0, iprofiler->GetProfilesCount()); |
| 1736 } | 1737 } |
| OLD | NEW |