diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-06-19 11:29:20 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-06-19 11:29:20 -0700 |
commit | 1c2d788b454670bf8fa1cb65c6251a8ff6ddcaf7 (patch) | |
tree | fb858c9ac49152af7cfdd956c12870206cc18c72 /html/101run_sandboxed.cc.html | |
parent | b755631561fd1a9223effcc833e2c8201582f63d (diff) | |
download | mu-1c2d788b454670bf8fa1cb65c6251a8ff6ddcaf7.tar.gz |
3927
Diffstat (limited to 'html/101run_sandboxed.cc.html')
-rw-r--r-- | html/101run_sandboxed.cc.html | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/html/101run_sandboxed.cc.html b/html/101run_sandboxed.cc.html index 6b234405..10365a78 100644 --- a/html/101run_sandboxed.cc.html +++ b/html/101run_sandboxed.cc.html @@ -105,11 +105,11 @@ if ('onhashchange' in window) { <span id="L41" class="LineNr"> 41 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> <span id="L42" class="LineNr"> 42 </span><span class="Normal">case</span> RUN_SANDBOXED: <span class="Delimiter">{</span> <span id="L43" class="LineNr"> 43 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L44" class="LineNr"> 44 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'run-sandboxed' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L44" class="LineNr"> 44 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'run-sandboxed' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> <span id="L45" class="LineNr"> 45 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L46" class="LineNr"> 46 </span> <span class="Delimiter">}</span> <span id="L47" class="LineNr"> 47 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_text<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L48" class="LineNr"> 48 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'run-sandboxed' should be a string, but got '"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L48" class="LineNr"> 48 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'run-sandboxed' should be a string, but got '"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> <span id="L49" class="LineNr"> 49 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L50" class="LineNr"> 50 </span> <span class="Delimiter">}</span> <span id="L51" class="LineNr"> 51 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -161,7 +161,7 @@ if ('onhashchange' in window) { <span id="L97" class="LineNr"> 97 </span> <span class="Conceal">¦</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">1</span><span class="Delimiter">;</span> i < Reserved_for_tests<span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> <span id="L98" class="LineNr"> 98 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> Memory<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>i<span class="Delimiter">);</span> <span id="L99" class="LineNr"> 99 </span> <span class="Delimiter">}</span> -<span id="L100" class="LineNr">100 </span> string command = <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span><a href='101run_sandboxed.cc.html#L474'>strip_comments</a><span class="Delimiter">(</span><a href='038new_text.cc.html#L143'>read_mu_text</a><span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">)));</span> +<span id="L100" class="LineNr">100 </span> string command = <a href='003trace.cc.html#L367'>trim</a><span class="Delimiter">(</span><a href='101run_sandboxed.cc.html#L474'>strip_comments</a><span class="Delimiter">(</span><a href='038new_text.cc.html#L143'>read_mu_text</a><span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">)));</span> <span id="L101" class="LineNr">101 </span> Name[get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"interactive"</span><span class="Delimiter">)</span>]<span class="Delimiter">.</span><a href='050scenario.cc.html#L60'>clear</a><span class="Delimiter">();</span> <span id="L102" class="LineNr">102 </span> <a href='101run_sandboxed.cc.html#L145'>run_code_begin</a><span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">should_stash_snapshots</span><span class="Comment">*/</span><span class="Constant">true</span><span class="Delimiter">);</span> <span id="L103" class="LineNr">103 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>command<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> @@ -184,7 +184,7 @@ if ('onhashchange' in window) { <span id="L120" class="LineNr">120 </span> <span class="Comment">// and wait for it</span> <span id="L121" class="LineNr">121 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Save_trace_stream<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L122" class="LineNr">122 </span> <span class="Conceal">¦</span> ++Save_trace_stream<span class="Delimiter">-></span>callstack_depth<span class="Delimiter">;</span> -<span id="L123" class="LineNr">123 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"trace"</span><span class="Delimiter">)</span> << <span class="Constant">"run-sandboxed: incrementing callstack depth to "</span> << Save_trace_stream<span class="Delimiter">-></span>callstack_depth << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L123" class="LineNr">123 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"trace"</span><span class="Delimiter">)</span> << <span class="Constant">"run-sandboxed: incrementing callstack depth to "</span> << Save_trace_stream<span class="Delimiter">-></span>callstack_depth << <a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> <span id="L124" class="LineNr">124 </span> <span class="Conceal">¦</span> assert<span class="Delimiter">(</span>Save_trace_stream<span class="Delimiter">-></span>callstack_depth < <span class="Constant">9000</span><span class="Delimiter">);</span> <span class="Comment">// 9998-101 plus cushion</span> <span id="L125" class="LineNr">125 </span> <span class="Delimiter">}</span> <span id="L126" class="LineNr">126 </span> Current_routine<span class="Delimiter">-></span>calls<span class="Delimiter">.</span>push_front<span class="Delimiter">(</span>call<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"sandbox"</span><span class="Delimiter">)));</span> @@ -293,8 +293,8 @@ if ('onhashchange' in window) { <span id="L229" class="LineNr">229 </span><span class="Constant">"]</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">);</span> <span id="L230" class="LineNr">230 </span> <span id="L231" class="LineNr">231 </span><span class="Comment">//: adjust errors in the sandbox</span> -<span id="L232" class="LineNr">232 </span><span class="Delimiter">:(after "string maybe(string s)")</span> -<span id="L233" class="LineNr">233 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>s == <span class="Constant">"interactive"</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">""</span><span class="Delimiter">;</span> +<span id="L232" class="LineNr">232 </span><span class="Delimiter">:(before "End maybe(recipe_name) Special-cases")</span> +<span id="L233" class="LineNr">233 </span><span class="Normal">if</span> <span class="Delimiter">(</span>recipe_name == <span class="Constant">"interactive"</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">""</span><span class="Delimiter">;</span> <span id="L234" class="LineNr">234 </span> <span id="L235" class="LineNr">235 </span><span class="Delimiter">:(scenario run_interactive_comments)</span> <span id="L236" class="LineNr">236 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ @@ -559,10 +559,10 @@ if ('onhashchange' in window) { <span id="L495" class="LineNr">495 </span><span class="Normal">int</span> <a href='101run_sandboxed.cc.html#L495'>trace_error_contents</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> <span id="L496" class="LineNr">496 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Trace_stream<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L497" class="LineNr">497 </span> ostringstream out<span class="Delimiter">;</span> -<span id="L498" class="LineNr">498 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>vector<trace_line>::iterator p = Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L498" class="LineNr">498 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>vector<trace_line>::iterator p = Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span><a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L499" class="LineNr">499 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>p<span class="Delimiter">-></span>label != <span class="Constant">"error"</span><span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L500" class="LineNr">500 </span> <span class="Conceal">¦</span> out << p<span class="Delimiter">-></span>contents<span class="Delimiter">;</span> -<span id="L501" class="LineNr">501 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>*--p<span class="Delimiter">-></span>contents<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> out << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L501" class="LineNr">501 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>*--p<span class="Delimiter">-></span>contents<span class="Delimiter">.</span><a href='003trace.cc.html#L197'>end</a><span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> out << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L502" class="LineNr">502 </span> <span class="Delimiter">}</span> <span id="L503" class="LineNr">503 </span> string result = out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span id="L504" class="LineNr">504 </span> <a href='101run_sandboxed.cc.html#L523'>truncate</a><span class="Delimiter">(</span>result<span class="Delimiter">);</span> @@ -573,10 +573,10 @@ if ('onhashchange' in window) { <span id="L509" class="LineNr">509 </span><span class="Normal">int</span> <a href='101run_sandboxed.cc.html#L509'>trace_app_contents</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> <span id="L510" class="LineNr">510 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Trace_stream<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L511" class="LineNr">511 </span> ostringstream out<span class="Delimiter">;</span> -<span id="L512" class="LineNr">512 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>vector<trace_line>::iterator p = Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L512" class="LineNr">512 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>vector<trace_line>::iterator p = Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-></span>past_lines<span class="Delimiter">.</span><a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L513" class="LineNr">513 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>p<span class="Delimiter">-></span>depth != App_depth<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L514" class="LineNr">514 </span> <span class="Conceal">¦</span> out << p<span class="Delimiter">-></span>contents<span class="Delimiter">;</span> -<span id="L515" class="LineNr">515 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>*--p<span class="Delimiter">-></span>contents<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> out << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L515" class="LineNr">515 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>*--p<span class="Delimiter">-></span>contents<span class="Delimiter">.</span><a href='003trace.cc.html#L197'>end</a><span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> out << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L516" class="LineNr">516 </span> <span class="Delimiter">}</span> <span id="L517" class="LineNr">517 </span> string result = out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span id="L518" class="LineNr">518 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>result<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> @@ -603,11 +603,11 @@ if ('onhashchange' in window) { <span id="L539" class="LineNr">539 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> <span id="L540" class="LineNr">540 </span><span class="Normal">case</span> RELOAD: <span class="Delimiter">{</span> <span id="L541" class="LineNr">541 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L542" class="LineNr">542 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'reload' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L542" class="LineNr">542 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'reload' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> <span id="L543" class="LineNr">543 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L544" class="LineNr">544 </span> <span class="Delimiter">}</span> <span id="L545" class="LineNr">545 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_text<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L546" class="LineNr">546 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'reload' should be a string, but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L546" class="LineNr">546 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'reload' should be a string, but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> <span id="L547" class="LineNr">547 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L548" class="LineNr">548 </span> <span class="Delimiter">}</span> <span id="L549" class="LineNr">549 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> |