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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptEventListener.cpp

Issue 2817533003: Replace ASSERT, RELEASE_ASSERT, and ASSERT_NOT_REACHED in bindings (Closed)
Patch Set: fixed dcheck build error Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/frame/LocalFrame.h" 44 #include "core/frame/LocalFrame.h"
45 #include "v8/include/v8.h" 45 #include "v8/include/v8.h"
46 46
47 namespace blink { 47 namespace blink {
48 48
49 V8LazyEventListener* CreateAttributeEventListener( 49 V8LazyEventListener* CreateAttributeEventListener(
50 Node* node, 50 Node* node,
51 const QualifiedName& name, 51 const QualifiedName& name,
52 const AtomicString& value, 52 const AtomicString& value,
53 const AtomicString& event_parameter_name) { 53 const AtomicString& event_parameter_name) {
54 ASSERT(node); 54 DCHECK(node);
55 if (value.IsNull()) 55 if (value.IsNull())
56 return nullptr; 56 return nullptr;
57 57
58 // FIXME: Very strange: we initialize zero-based number with '1'. 58 // FIXME: Very strange: we initialize zero-based number with '1'.
59 TextPosition position(OrdinalNumber::FromZeroBasedInt(1), 59 TextPosition position(OrdinalNumber::FromZeroBasedInt(1),
60 OrdinalNumber::First()); 60 OrdinalNumber::First());
61 String source_url; 61 String source_url;
62 62
63 v8::Isolate* isolate = ToIsolate(&node->GetDocument()); 63 v8::Isolate* isolate = ToIsolate(&node->GetDocument());
64 if (LocalFrame* frame = node->GetDocument().GetFrame()) { 64 if (LocalFrame* frame = node->GetDocument().GetFrame()) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 v8::HandleScope handle_scope(isolate); 150 v8::HandleScope handle_scope(isolate);
151 v8::Local<v8::Object> handler = 151 v8::Local<v8::Object> handler =
152 EventListenerHandler(execution_context, listener); 152 EventListenerHandler(execution_context, listener);
153 if (handler.IsEmpty()) 153 if (handler.IsEmpty())
154 return nullptr; 154 return nullptr;
155 return SourceLocation::FromFunction( 155 return SourceLocation::FromFunction(
156 EventListenerEffectiveFunction(isolate, handler)); 156 EventListenerEffectiveFunction(isolate, handler));
157 } 157 }
158 158
159 } // namespace blink 159 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698