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

Side by Side Diff: src/extensions/i18n/break-iterator.cc

Issue 18509003: Keep two empty lines between declarations for cpp files (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/execution.cc ('k') | src/extensions/i18n/collator.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 // 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 v8::Local<v8::Object> handle = v8::Local<v8::Object>::New(isolate, *object); 75 v8::Local<v8::Object> handle = v8::Local<v8::Object>::New(isolate, *object);
76 delete UnpackBreakIterator(handle); 76 delete UnpackBreakIterator(handle);
77 77
78 delete static_cast<icu::UnicodeString*>( 78 delete static_cast<icu::UnicodeString*>(
79 handle->GetAlignedPointerFromInternalField(1)); 79 handle->GetAlignedPointerFromInternalField(1));
80 80
81 // Then dispose of the persistent handle to JS object. 81 // Then dispose of the persistent handle to JS object.
82 object->Dispose(isolate); 82 object->Dispose(isolate);
83 } 83 }
84 84
85
85 // Throws a JavaScript exception. 86 // Throws a JavaScript exception.
86 static v8::Handle<v8::Value> ThrowUnexpectedObjectError() { 87 static v8::Handle<v8::Value> ThrowUnexpectedObjectError() {
87 // Returns undefined, and schedules an exception to be thrown. 88 // Returns undefined, and schedules an exception to be thrown.
88 return v8::ThrowException(v8::Exception::Error( 89 return v8::ThrowException(v8::Exception::Error(
89 v8::String::New("BreakIterator method called on an object " 90 v8::String::New("BreakIterator method called on an object "
90 "that is not a BreakIterator."))); 91 "that is not a BreakIterator.")));
91 } 92 }
92 93
94
93 // Deletes the old value and sets the adopted text in corresponding 95 // Deletes the old value and sets the adopted text in corresponding
94 // JavaScript object. 96 // JavaScript object.
95 icu::UnicodeString* ResetAdoptedText( 97 icu::UnicodeString* ResetAdoptedText(
96 v8::Handle<v8::Object> obj, v8::Handle<v8::Value> value) { 98 v8::Handle<v8::Object> obj, v8::Handle<v8::Value> value) {
97 // Get the previous value from the internal field. 99 // Get the previous value from the internal field.
98 icu::UnicodeString* text = static_cast<icu::UnicodeString*>( 100 icu::UnicodeString* text = static_cast<icu::UnicodeString*>(
99 obj->GetAlignedPointerFromInternalField(1)); 101 obj->GetAlignedPointerFromInternalField(1));
100 delete text; 102 delete text;
101 103
102 // Assign new value to the internal pointer. 104 // Assign new value to the internal pointer.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 icu_locale.getName(), result, ULOC_FULLNAME_CAPACITY, FALSE, &status); 324 icu_locale.getName(), result, ULOC_FULLNAME_CAPACITY, FALSE, &status);
323 if (U_SUCCESS(status)) { 325 if (U_SUCCESS(status)) {
324 resolved->Set(v8::String::New("locale"), v8::String::New(result)); 326 resolved->Set(v8::String::New("locale"), v8::String::New(result));
325 } else { 327 } else {
326 // This would never happen, since we got the locale from ICU. 328 // This would never happen, since we got the locale from ICU.
327 resolved->Set(v8::String::New("locale"), v8::String::New("und")); 329 resolved->Set(v8::String::New("locale"), v8::String::New("und"));
328 } 330 }
329 } 331 }
330 332
331 } // namespace v8_i18n 333 } // namespace v8_i18n
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | src/extensions/i18n/collator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698