aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Marton <pmarton@netflix.com>2018-05-21 16:00:54 -0700
committerPeter Marton <pmarton@netflix.com>2018-05-21 16:00:54 -0700
commite479adf394dae62b6ddd82675d840d24c3431b83 (patch)
tree2d9dc23d44c69baf68687b460db5cadbadd90b54 /src
parent13f94b4092cff9bc36a62adb4bf2e362b4f85979 (diff)
downloadprotobuf-e479adf394dae62b6ddd82675d840d24c3431b83.tar.gz
protobuf-e479adf394dae62b6ddd82675d840d24c3431b83.tar.bz2
protobuf-e479adf394dae62b6ddd82675d840d24c3431b83.zip
fix(js_generator): check for proto
Diffstat (limited to 'src')
-rwxr-xr-xsrc/google/protobuf/compiler/js/js_generator.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/js/js_generator.cc b/src/google/protobuf/compiler/js/js_generator.cc
index dfa22ac6..0d9eeb95 100755
--- a/src/google/protobuf/compiler/js/js_generator.cc
+++ b/src/google/protobuf/compiler/js/js_generator.cc
@@ -1681,6 +1681,7 @@ void Generator::GenerateProvides(const GeneratorOptions& options,
if (options.import_style == GeneratorOptions::kImportCommonJsStrict) {
string namespaceObject = *it;
// Remove "proto." from the namespace object
+ GOOGLE_CHECK(namespaceObject.compare(0, 6, "proto."));
namespaceObject.erase(0, 6);
printer->Print("goog.exportSymbol('$name$', null, proto);\n", "name",
namespaceObject);