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

Unified Diff: runtime/bin/filter.cc

Issue 22303002: Auto create ApiLocalScope before calling native functions, this ensures that (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/filter_unsupported.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/filter.cc
===================================================================
--- runtime/bin/filter.cc (revision 25822)
+++ runtime/bin/filter.cc (working copy)
@@ -37,7 +37,6 @@
}
void FUNCTION_NAME(Filter_CreateZLibInflate)(Dart_NativeArguments args) {
- Dart_EnterScope();
Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
Filter* filter = new ZLibInflateFilter();
if (filter == NULL || !filter->Init()) {
@@ -50,11 +49,9 @@
delete filter;
Dart_PropagateError(result);
}
- Dart_ExitScope();
}
void FUNCTION_NAME(Filter_CreateZLibDeflate)(Dart_NativeArguments args) {
- Dart_EnterScope();
Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
Dart_Handle gzip_obj = Dart_GetNativeArgument(args, 1);
Dart_Handle level_obj = Dart_GetNativeArgument(args, 2);
@@ -79,11 +76,9 @@
delete filter;
Dart_PropagateError(result);
}
- Dart_ExitScope();
}
void FUNCTION_NAME(Filter_Process)(Dart_NativeArguments args) {
- Dart_EnterScope();
Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
Filter* filter = GetFilter(filter_obj);
Dart_Handle data_obj = Dart_GetNativeArgument(args, 1);
@@ -121,12 +116,10 @@
Dart_ThrowException(DartUtils::NewInternalError(
"Call to Process while still processing data"));
}
- Dart_ExitScope();
}
void FUNCTION_NAME(Filter_Processed)(Dart_NativeArguments args) {
- Dart_EnterScope();
Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
Filter* filter = GetFilter(filter_obj);
Dart_Handle flush_obj = Dart_GetNativeArgument(args, 1);
@@ -158,16 +151,13 @@
memmove(io_buffer, filter->processed_buffer(), read);
Dart_SetReturnValue(args, result);
}
- Dart_ExitScope();
}
void FUNCTION_NAME(Filter_End)(Dart_NativeArguments args) {
- Dart_EnterScope();
Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0);
Filter* filter = GetFilter(filter_obj);
EndFilter(filter_obj, filter);
- Dart_ExitScope();
}
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/filter_unsupported.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698