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

Side by Side Diff: src/extensions/trigger-failure-extension.cc

Issue 1224623004: Make v8::Handle as "deprecated soon" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/extensions/trigger-failure-extension.h ('k') | src/full-codegen.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/extensions/trigger-failure-extension.h" 5 #include "src/extensions/trigger-failure-extension.h"
6 #include "src/v8.h" 6 #include "src/v8.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
11 11
12 const char* const TriggerFailureExtension::kSource = 12 const char* const TriggerFailureExtension::kSource =
13 "native function triggerCheckFalse();" 13 "native function triggerCheckFalse();"
14 "native function triggerAssertFalse();" 14 "native function triggerAssertFalse();"
15 "native function triggerSlowAssertFalse();"; 15 "native function triggerSlowAssertFalse();";
16 16
17 17
18 v8::Handle<v8::FunctionTemplate> 18 v8::Local<v8::FunctionTemplate>
19 TriggerFailureExtension::GetNativeFunctionTemplate( 19 TriggerFailureExtension::GetNativeFunctionTemplate(v8::Isolate* isolate,
20 v8::Isolate* isolate, 20 v8::Local<v8::String> str) {
21 v8::Handle<v8::String> str) {
22 if (strcmp(*v8::String::Utf8Value(str), "triggerCheckFalse") == 0) { 21 if (strcmp(*v8::String::Utf8Value(str), "triggerCheckFalse") == 0) {
23 return v8::FunctionTemplate::New( 22 return v8::FunctionTemplate::New(
24 isolate, 23 isolate,
25 TriggerFailureExtension::TriggerCheckFalse); 24 TriggerFailureExtension::TriggerCheckFalse);
26 } else if (strcmp(*v8::String::Utf8Value(str), "triggerAssertFalse") == 0) { 25 } else if (strcmp(*v8::String::Utf8Value(str), "triggerAssertFalse") == 0) {
27 return v8::FunctionTemplate::New( 26 return v8::FunctionTemplate::New(
28 isolate, 27 isolate,
29 TriggerFailureExtension::TriggerAssertFalse); 28 TriggerFailureExtension::TriggerAssertFalse);
30 } else { 29 } else {
31 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(str), "triggerSlowAssertFalse")); 30 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(str), "triggerSlowAssertFalse"));
(...skipping 16 matching lines...) Expand all
48 } 47 }
49 48
50 49
51 void TriggerFailureExtension::TriggerSlowAssertFalse( 50 void TriggerFailureExtension::TriggerSlowAssertFalse(
52 const v8::FunctionCallbackInfo<v8::Value>& args) { 51 const v8::FunctionCallbackInfo<v8::Value>& args) {
53 SLOW_DCHECK(false); 52 SLOW_DCHECK(false);
54 } 53 }
55 54
56 } // namespace internal 55 } // namespace internal
57 } // namespace v8 56 } // namespace v8
OLDNEW
« no previous file with comments | « src/extensions/trigger-failure-extension.h ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698